| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,20 +18,21 @@ Getting your development environment set up | |||
| 18 | 18 | ||
| 19 | 19 | bpython supports Python 2.6, 2.7, 3.3 and 3.4. The code is written in Python | |
| 20 | 20 | 2 and transformed for Python 3 with 2to3. This means that it's easier | |
| 21 | - to work on bpython with Python 2 because it's you can use `python setup.py develop` | ||
| 21 | + to work on bpython with Python 2 because you can use ``python setup.py develop`` | ||
| 22 | + or ``pip install -e .`` | ||
| 22 | 23 | (`development mode | |
| 23 | 24 | <https://pythonhosted.org/setuptools/setuptools.html#development-mode>`_ installs | |
| 24 | 25 | by linking to the bpython source instead of copying it over) | |
| 25 | 26 | in a more straightforward way to have your changes immediately reflected by | |
| 26 | - your bpython installation and the `bpython`, `bpython-curtsies`, and `bpython-urwid` | ||
| 27 | + your bpython installation and the `bpython`, `bpython-curses`, and `bpython-urwid` | ||
| 27 | 28 | commands. | |
| 28 | 29 | ||
| 29 | 30 | Using a virtual environment is probably a good idea. Create a virtual environment with | |
| 30 | 31 | ||
| 31 | 32 | .. code-block:: bash | |
| 32 | 33 | ||
| 33 | 34 | $ virtualenv bpython-dev # determines Python version used | |
| 34 | - $ source bpython-dev/bin/activate # necssary every time you work on bpython | ||
| 35 | + $ source bpython-dev/bin/activate # necessary every time you work on bpython | ||
| 35 | 36 | ||
| 36 | 37 | Fork bpython in the GitHub web interface, then clone the repo: | |
| 37 | 38 | ||
@@ -40,28 +41,53 @@ Fork bpython in the GitHub web interface, then clone the repo: | |||
| 40 | 41 | $ git clone git@github.com:YOUR_GITHUB_USERNAME/bpython.git | |
| 41 | 42 | $ # or "git clone https://github.com/YOUR_GITHUB_USERNAME/bpython.git" | |
| 42 | 43 | ||
| 43 | - Next install the dependencies and install your development copy of bpython: | ||
| 44 | + Next install the install your development copy of bpython and its dependencies: | ||
| 44 | 45 | ||
| 45 | 46 | .. code-block:: bash | |
| 46 | 47 | ||
| 47 | - $ pip install pygments requests # install required dependencies | ||
| 48 | - $ pip install curtsies greenlet watchdog urwid # install optional dependencies | ||
| 49 | - $ pip install sphinx mock nosetests # development dependencies | ||
| 50 | 48 | $ cd bpython | |
| 51 | - $ python setup.py develop | ||
| 49 | + $ pip install -e . # install bpython and required dependencies | ||
| 50 | + $ pip install watchdog urwid # install optional dependencies | ||
| 51 | + $ pip install sphinx mock nose # development dependencies | ||
| 52 | 52 | <modify a file in some way> | |
| 53 | - $ bpython-curtsies # this runs your modified copy of bpython! | ||
| 53 | + $ bpython # this runs your modified copy of bpython! | ||
| 54 | 54 | ||
| 55 | - As a first dev task, I recommend getting `bpython` to print your name every time you hit a specific key. | ||
| 55 | + .. note:: | ||
| 56 | + | ||
| 57 | + Many requirements are also available from your distribution's package | ||
| 58 | + manager. On Debian/Ubuntu based systems, the following packages can be used: | ||
| 59 | + | ||
| 60 | + .. code-block:: bash | ||
| 61 | + | ||
| 62 | + $ sudp apt-get install python-greenlet python-pygments python-requests | ||
| 63 | + $ sudo apt-get install python-watchdog python-urwid | ||
| 64 | + $ sudo apt-get install python-sphinx python-mock python-nose | ||
| 65 | + | ||
| 66 | + Rememeber to replace ``python`` with ``python3`` in every package name if | ||
| 67 | + you intend to develop with Python 3. You also need to run `virtualenv` with | ||
| 68 | + `--system-site-packages` packages, if you want to use the packages provided | ||
| 69 | + by your distribution. | ||
| 70 | + | ||
| 71 | + .. note:: | ||
| 72 | + | ||
| 73 | + Installation of some dependencies with ``pip`` requires Python headers and a | ||
| 74 | + C compiler. These are also available from your package manager. | ||
| 75 | + | ||
| 76 | + .. code-block:: bash | ||
| 77 | + | ||
| 78 | + $ sudo apt-get install gcc python-dev | ||
| 79 | + | ||
| 80 | + As a first dev task, I recommend getting `bpython` to print your name every | ||
| 81 | + time you hit a specific key. | ||
| 56 | 82 | ||
| 57 | 83 | To run tests from the bpython directory: | |
| 58 | 84 | ||
| 59 | 85 | .. code-block:: bash | |
| 60 | 86 | ||
| 61 | 87 | $ nosetests | |
| 62 | 88 | ||
| 63 | - To build the docs: | ||
| 64 | - ------------------ | ||
| 89 | + Building the documentation | ||
| 90 | + -------------------------- | ||
| 65 | 91 | ||
| 66 | 92 | The documentation is included in the bpython repository. After | |
| 67 | 93 | checking out the bpython repository and installing `sphinx` as described in | |
@@ -75,7 +101,7 @@ repository to build the documentation: | |||
| 75 | 101 | Afterwards you can point your browser to `doc/sphinx/build/html/index.html`. | |
| 76 | 102 | Don't forget to recreate the HTML after you make changes. | |
| 77 | 103 | ||
| 78 | - To hack on the site or theme | ||
| 104 | + Hacking on the site or theme | ||
| 79 | 105 | ---------------------------- | |
| 80 | 106 | ||
| 81 | 107 | The site (and its theme as well) is stored in a separate repository and built using | |
| Back | FazBrowse Home | New Git URL |
0 commit comments