[pygobject] Break up dev environment setup in to more parts, fix broken links



commit f311ebd6c260f564bbfe325489006b8f3e6d1beb
Author: Dan Yeaw <dan yeaw me>
Date:   Wed Mar 7 21:12:34 2018 -0500

    Break up dev environment setup in to more parts, fix broken links
    
    Signed-off-by: Dan Yeaw <dan yeaw me>

 docs/devguide/dev_environ.rst | 208 +++++++++++++++++++++++++++++++-----------
 docs/getting_started.rst      |  20 ++--
 2 files changed, 164 insertions(+), 64 deletions(-)
---
diff --git a/docs/devguide/dev_environ.rst b/docs/devguide/dev_environ.rst
index 89d8693e..e08c86dc 100644
--- a/docs/devguide/dev_environ.rst
+++ b/docs/devguide/dev_environ.rst
@@ -16,7 +16,17 @@ instructions on ":ref:`gettingstarted`" first, as they are a pre-requirement.
 Pipenv Setup
 ************
 
-.. _ubuntu:
+Install Dependencies
+====================
+In order to compile Python and pip install pygobject, pygobjectendencies are need for
+your operating system.
+
+=========================================== ======================================== 
==============================================
+|ubuntu-logo| :ref:`Ubuntu <ubuntu-pygobject>`    |fedora-logo| :ref:`Fedora <fedora-pygobject>` |arch-logo| 
:ref:`Arch Linux <arch-pygobject>`
+|windows-logo| :ref:`Windows <windows-pygobject>` |macosx-logo| :ref:`macOS <macosx-pygobject>`  
|opensuse-logo| :ref:`openSUSE <opensuse-pygobject>`
+=========================================== ======================================== 
==============================================
+
+.. _ubuntu-pygobject:
 
 |ubuntu-logo| Ubuntu / |debian-logo| Debian
 -------------------------------------------
@@ -27,18 +37,9 @@ Pipenv Setup
     sudo apt-get install -y libgirepository1.0-dev build-essential \
       libbz2-dev libreadline-dev libssl-dev zlib1g-dev libsqlite3-dev wget \
       curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
-    git clone https://github.com/pyenv/pyenv.git ~/.pyenv
-    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
-    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
-    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
-    ~/.pyenv/bin/pyenv install 3.6.4
-    curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - 
--src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
-    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
-    ~/.local/bin/pipsi install pew
-    ~/.local/bin/pipsi install pipenv
 
 
-.. _fedora:
+.. _fedora-pygobject:
 
 |fedora-logo| Fedora
 --------------------
@@ -50,18 +51,9 @@ Pipenv Setup
     sudo dnf install -y gcc zlib-devel bzip2 bzip2-devel readline-devel \
       sqlite sqlite-devel openssl-devel tk-devel git python3-cairo-devel \
       cairo-gobject-devel gobject-introspection-devel
-    git clone https://github.com/pyenv/pyenv.git ~/.pyenv
-    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
-    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
-    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
-    ~/.pyenv/bin/pyenv install 3.6.4
-    curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - 
--src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
-    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
-    ~/.local/bin/pipsi install pew
-    ~/.local/bin/pipsi install pipenv
 
 
-.. _arch:
+.. _arch-pygobject:
 
 |arch-logo| Arch Linux
 ----------------------
@@ -70,18 +62,9 @@ Pipenv Setup
 
     sudo pacman -S --noconfirm python-virtualenv python-wheel
     sudo pacman -S --noconfirm base-devel openssl zlib git gobject-introspection
-    git clone https://github.com/pyenv/pyenv.git ~/.pyenv
-    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
-    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
-    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
-    ~/.pyenv/bin/pyenv install 3.6.4
-    curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - 
--src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
-    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
-    ~/.local/bin/pipsi install pew
-    ~/.local/bin/pipsi install pipenv
 
 
-.. _opensuse:
+.. _opensuse-pygobject:
 
 |opensuse-logo| openSUSE
 ------------------------
@@ -91,32 +74,70 @@ Pipenv Setup
     sudo zypper install -y python3-venv python3-wheel gobject-introspection \
       python3-cairo-devel openssl zlib git
     sudo zypper install --type pattern devel_basis
+
+
+.. _windows-pygobject:
+
+|windows-logo| Windows
+----------------------
+
+.. code:: console
+
+    pacman -S --needed --noconfirm base-devel mingw-w64-i686-toolchain git \
+       mingw-w64-i686-python3 mingw-w64-i686-python3-cairo \
+       mingw-w64-i686-gobject-introspection mingw-w64-i686-libffi
+
+.. _macos-pygobject:
+
+|macosx-logo| macOS
+-------------------
+
+No extra pygobjectendencies needed.
+
+
+.. _install-pyenv:
+
+Install `pyenv`_
+================
+
+`pyenv`_ lets you easily switch between multiple versions of Python.
+
+============================================= =========================================
+|ubuntu-logo| :ref:`Linux <linux-pyenv>`      |macosx-logo| :ref:`macOS <macosx-pyenv>`
+|windows-logo| :ref:`Windows <windows-pyenv>`
+============================================= =========================================
+
+.. _linux-pyenv:
+
+Linux
+-----
+
+.. code:: console
+
     git clone https://github.com/pyenv/pyenv.git ~/.pyenv
     echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
     echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
     echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
-    ~/.pyenv/bin/pyenv install 3.6.4
-    curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - 
--src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
-    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
-    ~/.local/bin/pipsi install pew
-    ~/.local/bin/pipsi install pipenv
+    source ~/.bashrc
+    pyenv install 3.6.4
+
 
-.. _windows:
+.. _windows-pyenv:
 
 |windows-logo| Windows
 ----------------------
 
-TODO: currently no way to install pyenv in Windows
+TODO: currently no way to install `pyenv`_ in Windows. So we'll use a normal
+`virtualenv`_ instead.
 
 .. code:: console
 
-    pacman -S --needed --noconfirm base-devel mingw-w64-i686-toolchain git \
-       mingw-w64-i686-python3 mingw-w64-i686-python3-cairo \
-       mingw-w64-i686-gobject-introspection mingw-w64-i686-libffi
     virtualenv --python 3 myvenv
     source myvenv/bin/activate
 
 
+.. _macos-pyenv:
+
 |macosx-logo| macOS
 -------------------
 
@@ -124,19 +145,72 @@ TODO: currently no way to install pyenv in Windows
 
     brew install pyenv
     pyenv install 3.6.4
+
+
+.. _install-pipsi:
+
+Install `pipsi`_
+=============
+
+`pipsi`_ is a wrapper around virtualenv and pip which installs
+scripts provided by python packages into separate virtualenvs to shield them
+from your system and each other. We'll use this to install pipenv.
+
+============================================= =========================================
+|ubuntu-logo| :ref:`Linux <linux-pipsi>`      |macosx-logo| :ref:`macOS <macosx-pipsi>`
+|windows-logo| :ref:`Windows <windows-pipsi>`
+============================================= =========================================
+
+.. _linux-pipsi:
+
+Linux
+-----
+
+.. code:: console
+
     curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - 
--src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
-    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile
-    ~/.local/bin/pipsi install pew
-    ~/.local/bin/pipsi install pipenv
+    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
+    source ~/.bashrc
+    pipsi install pew
+    pipsi install pipenv
 
 
-.. _otherprojects:
+.. _windows-pipsi:
+
+|windows-logo| Windows
+----------------------
+
+.. code:: console
+
+    curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - 
--src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
+
+Add C:\Users\.local\bin to your path via Control Panel->All Control Panel
+Items->System->Advanced System Setttings->Environment Variables
+
+.. code:: console
+
+    pipsi install pew
+    pipsi install pipenv
+
+
+.. _macos-pipsi:
+
+|macosx-logo| macOS
+-------------------
+
+.. code:: console
+
+    brew install pyenv
+    pyenv install 3.6.4
+
+
+.. _projects-pygobject-pygobjectendencies:
 
 ************************************
 Projects with PyGObject Dependencies
 ************************************
 
-If you are going to work on a project that has PyGObject as a dependency, then
+If you are going to work on a project that has PyGObject as a pygobjectendency, then
 do the following additional steps:
 
 .. code:: console
@@ -149,7 +223,7 @@ do the following additional steps:
     pipenv shell
 
 
-.. _pygobjectwork:
+.. _work-on-pygobject:
 
 *****************
 Work on PyGObject
@@ -167,33 +241,39 @@ additional steps:
     pipenv install flake8
     pipenv shell
 
+================================================= ============================================== 
====================================================
+|ubuntu-logo| :ref:`Ubuntu <ubuntu-pygobject>`    |fedora-logo| :ref:`Fedora <fedora-pygobject>` |arch-logo| 
:ref:`Arch Linux <arch-pygobject>`
+|windows-logo| :ref:`Windows <windows-pygobject>` |macosx-logo| :ref:`macOS <macosx-pygobject>`  
|opensuse-logo| :ref:`openSUSE <opensuse-pygobject>`
+================================================= ============================================== 
====================================================
 
-.. _ubuntu:
+.. _ubuntu-pygobject:
 
 |ubuntu-logo| Ubuntu / |debian-logo| Debian
 -------------------------------------------
 
 .. code:: console
 
-    sudo apt build-dep pygobject
+    sudo apt build-pygobject pygobject
     sudo apt install autoconf-archive
     ./autogen.sh
     make
     make check
 
 
-.. _fedora:
+.. _fedora-pygobject:
 
 |fedora-logo| Fedora
 --------------------
 
-    sudo dnf builddep pygobject
+.. code:: console
+
+    sudo dnf buildpygobject pygobject
     ./autogen.sh
     make
     make check
 
 
- .. _arch:
+ .. _arch-pygobject:
 
 |arch-logo| Arch Linux
 ----------------------
@@ -206,11 +286,31 @@ additional steps:
     make check
 
 
-.. _windows:
+.. _windows-pygobject:
 
 |windows-logo| Windows
 ----------------------
+
+.. code:: console
+
     pacman -S --needed --noconfirm autoconf-archive
     ./autogen.sh
     make
-    make check
\ No newline at end of file
+    make check
+
+
+.. _macos-pygobject:
+
+|macosx-logo| macOS
+-------------------
+
+.. code:: console
+
+    ./autogen.sh
+    make
+    make check
+
+.. _pyenv: https://github.com/pyenv/pyenv
+.. _pipsi: https://github.com/mitsuhiko/pipsi
+.. _pipenv: https://github.com/pypa/pipenv
+.. _virtualenv: https://www.virtualenv.org
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index f07eb1c7..adee81ad 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -25,13 +25,13 @@ the following content and save it somewhere:
 Before we can run the example application we need to install PyGObject, GTK+
 and their dependencies. Follow the instructions for your platform below.
 
-======================================= ==================================== 
==================================== ==========================================
-|ubuntu-logo| :ref:`Ubuntu <ubuntu>`    |fedora-logo| :ref:`Fedora <fedora>` |arch-logo| :ref:`Arch Linux 
<arch>` |opensuse-logo| :ref:`openSUSE <opensuse>`
-|windows-logo| :ref:`Windows <windows>` |macosx-logo| :ref:`macOS <macosx>`  |python-logo| :ref:`PyPI <pypi>`
-======================================= ==================================== 
==================================== ==========================================
+======================================================= ==================================================== 
==================================================== 
==========================================================
+|ubuntu-logo| :ref:`Ubuntu <ubuntu-getting-started>`    |fedora-logo| :ref:`Fedora <fedora-getting-started>` 
|arch-logo| :ref:`Arch Linux <arch-getting-started>` |opensuse-logo| :ref:`openSUSE 
<opensuse-getting-started>`
+|windows-logo| :ref:`Windows <windows-getting-started>` |macosx-logo| :ref:`macOS <macosx-getting-started>`  
|python-logo| :ref:`PyPI <pypi-getting-started>`
+======================================================= ==================================================== 
==================================================== 
==========================================================
 
 
-.. _windows:
+.. _windows-getting-started:
 
 |windows-logo| Windows
 ----------------------
@@ -48,7 +48,7 @@ and their dependencies. Follow the instructions for your platform below.
     :scale: 60%
 
 
-.. _ubuntu:
+.. _ubuntu-getting-started:
 
 |ubuntu-logo| Ubuntu / |debian-logo| Debian
 -------------------------------------------
@@ -62,7 +62,7 @@ and their dependencies. Follow the instructions for your platform below.
     :scale: 60%
 
 
-.. _fedora:
+.. _fedora-getting-started:
 
 |fedora-logo| Fedora
 --------------------
@@ -73,7 +73,7 @@ and their dependencies. Follow the instructions for your platform below.
 4) Run ``python3 hello.py``
 
 
-.. _arch:
+.. _arch-getting-started:
 
 |arch-logo| Arch Linux
 ----------------------
@@ -84,7 +84,7 @@ and their dependencies. Follow the instructions for your platform below.
 4) Run ``python3 hello.py``
 
 
-.. _opensuse:
+.. _opensuse-getting-started:
 
 |opensuse-logo| openSUSE
 ------------------------
@@ -95,7 +95,7 @@ and their dependencies. Follow the instructions for your platform below.
 4) Run ``python3 hello.py``
 
 
-.. _macosx:
+.. _macosx-getting-started:
 
 |macosx-logo| macOS
 -------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]