Skip to content

Commit 589ea1c

Browse files
committed
Update README, mention NumPy as optional dependency
1 parent dcb5ec7 commit 589ea1c

File tree

3 files changed

+43
-39
lines changed

3 files changed

+43
-39
lines changed

CONTRIBUTING.rst

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@ please create an issue or a pull request at
66
http://github.com/spatialaudio/jackclient-python.
77
Contributions are always welcome!
88

9-
If you make changes to the documentation, you can re-create the HTML pages
10-
using Sphinx_.
9+
Instead of pip-installing the latest release from PyPI, you should get the newest
10+
development version from Github_::
1111

12-
.. _Sphinx: http://sphinx-doc.org/
12+
git clone https://github.com/spatialaudio/jackclient-python.git
13+
cd jackclient-python
14+
python setup.py develop --user
15+
16+
.. _Github: http://github.com/spatialaudio/jackclient-python/
17+
18+
This way, your installation always stays up-to-date, even if you pull new
19+
changes from the Github repository.
20+
21+
If you prefer, you can also replace the last command with::
1322

23+
pip install --user -e .
24+
25+
... where ``-e`` stands for ``--editable``.
26+
27+
If you make changes to the documentation, you can re-create the HTML pages
28+
using Sphinx_.
1429
You can install it and a few other necessary packages with::
1530

1631
pip install -r doc/requirements.txt --user
@@ -21,6 +36,8 @@ To create the HTML pages, use::
2136

2237
The generated files will be available in the directory ``build/sphinx/html/``.
2338

39+
.. _Sphinx: http://sphinx-doc.org/
40+
2441
There are no proper tests (yet?), but the code examples from the README file
2542
can be verified by::
2643

README.rst

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,24 @@ Python:
1919
Of course, you'll need Python_.
2020
Any version where CFFI (see below) is supported should work.
2121
If you don't have Python installed yet, you should get one of the
22-
distributions which already include CFFI (and many other useful things),
23-
e.g. Anaconda_ or WinPython_.
22+
distributions which already include CFFI and NumPy (and many other useful
23+
things), e.g. Anaconda_ or WinPython_.
24+
25+
pip/setuptools:
26+
Those are needed for the installation of the Python module and its
27+
dependencies. Most systems will have these installed already, but if not,
28+
you should install it with your package manager or you can download and
29+
install pip and setuptools as described on the `pip installation`_ page.
30+
If you happen to have pip but not setuptools, use this command::
31+
32+
pip install setuptools --user
2433

2534
CFFI:
2635
The `C Foreign Function Interface for Python`_ is used to access the C-API
2736
of the JACK library from within Python. It supports CPython 2.6, 2.7, 3.x;
2837
and is distributed with PyPy_ 2.0 beta2 or later.
2938
You should install it with your package manager (if it's not installed
30-
already), or you can get it with pip_::
39+
already), or you can get it with::
3140

3241
pip install cffi --user
3342

@@ -41,26 +50,27 @@ JACK library:
4150
If you prefer, you can of course also download the sources and compile
4251
everything locally.
4352

44-
setuptools:
45-
This is needed for the installation of the Python module. Most systems will
46-
have this installed already, but if not, you can install it with your
47-
package manager or you can get it with pip_::
48-
49-
pip install setuptools --user
53+
NumPy (optional):
54+
NumPy_ is only needed if you want to NumPy arrays in the process callback.
55+
The only place where NumPy is needed is `jack.OwnPort.get_array()`.
56+
If you need NumPy, you should install it with your package manager or use a
57+
Python distribution that already includes NumPy (see above).
58+
Installing NumPy with pip is not recommended.
5059

60+
.. _JACK: http://jackaudio.org/
61+
.. _NumPy: http://www.numpy.org/
5162
.. _Python: http://www.python.org/
5263
.. _Anaconda: http://docs.continuum.io/anaconda/
5364
.. _WinPython: http://winpython.github.io/
5465
.. _C Foreign Function Interface for Python: http://cffi.readthedocs.org/
5566
.. _PyPy: http://pypy.org/
56-
.. _JACK: http://jackaudio.org/
5767
.. _JACK download page: http://jackaudio.org/downloads/
58-
.. _pip: http://www.pip-installer.org/en/latest/installing.html
68+
.. _pip installation: http://www.pip-installer.org/en/latest/installing.html
5969

6070
Installation
6171
------------
6272

63-
Once you have installed the above-mentioned dependencies, you can use pip_
73+
Once you have installed the above-mentioned dependencies, you can use pip
6474
to download and install the latest release with a single command::
6575

6676
pip install JACK-Client --user
@@ -72,30 +82,6 @@ To un-install, use::
7282

7383
pip uninstall JACK-Client
7484

75-
If you prefer, you can also download the package from PyPI_, extract it, change
76-
to the main directory and install it using::
77-
78-
python setup.py install --user
79-
80-
.. _PyPI: http://pypi.python.org/pypi/JACK-Client/
81-
82-
If you want to get the newest development version from Github_::
83-
84-
git clone https://github.com/spatialaudio/jackclient-python.git
85-
cd jackclient-python
86-
python setup.py develop --user
87-
88-
.. _Github: http://github.com/spatialaudio/jackclient-python/
89-
90-
This way, your installation always stays up-to-date, even if you pull new
91-
changes from the Github repository.
92-
93-
If you prefer, you can also replace the last command with::
94-
95-
pip install --user -e .
96-
97-
... where ``-e`` stands for ``--editable``.
98-
9985
If you want to avoid installation altogether, you can simply copy ``jack.py``
10086
to your working directory (or to any directory in your Python path).
10187

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def run_tests(self):
2727
version=__version__,
2828
py_modules=["jack"],
2929
install_requires=["CFFI"],
30+
extras_require={"NumPy": ["NumPy"]},
3031
author="Matthias Geier",
3132
author_email="[email protected]",
3233
description="JACK Audio Connection Kit (JACK) Client for Python",

0 commit comments

Comments
 (0)