X Tutup
Skip to content

Commit 8ad41e8

Browse files
committed
Merge branch 'update-contrib-docs'
2 parents a21962f + a609304 commit 8ad41e8

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

doc/sphinx/source/contributing.rst

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,21 @@ Getting your development environment set up
1818

1919
bpython supports Python 2.6, 2.7, 3.3 and 3.4. The code is written in Python
2020
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 .``
2223
(`development mode
2324
<https://pythonhosted.org/setuptools/setuptools.html#development-mode>`_ installs
2425
by linking to the bpython source instead of copying it over)
2526
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`
2728
commands.
2829

2930
Using a virtual environment is probably a good idea. Create a virtual environment with
3031

3132
.. code-block:: bash
3233
3334
$ 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
3536
3637
Fork bpython in the GitHub web interface, then clone the repo:
3738

@@ -40,28 +41,53 @@ Fork bpython in the GitHub web interface, then clone the repo:
4041
$ git clone git@github.com:YOUR_GITHUB_USERNAME/bpython.git
4142
$ # or "git clone https://github.com/YOUR_GITHUB_USERNAME/bpython.git"
4243
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:
4445

4546
.. code-block:: bash
4647
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
5048
$ 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
5252
<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!
5454
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.
5682

5783
To run tests from the bpython directory:
5884

5985
.. code-block:: bash
6086
6187
$ nosetests
6288
63-
To build the docs:
64-
------------------
89+
Building the documentation
90+
--------------------------
6591

6692
The documentation is included in the bpython repository. After
6793
checking out the bpython repository and installing `sphinx` as described in
@@ -75,7 +101,7 @@ repository to build the documentation:
75101
Afterwards you can point your browser to `doc/sphinx/build/html/index.html`.
76102
Don't forget to recreate the HTML after you make changes.
77103

78-
To hack on the site or theme
104+
Hacking on the site or theme
79105
----------------------------
80106

81107
The site (and its theme as well) is stored in a separate repository and built using

0 commit comments

Comments
 (0)
X Tutup