7
`python-libdiscid` depends on the following components:
9
* :musicbrainz:`libdiscid`
10
* `Cython`__ (>= 0.15)
12
On Debian based systems, the dependencies are only an `apt-get` away::
14
apt-get install cython libdiscid0-dev
16
`Cython` is also available via `PyPI`__::
20
.. __: http://www.cython.org/
21
.. __: https://pypi.python.org/pypi/Cython/
26
`python-libdiscid` is available from `PyPI`__::
30
You can also download the tarball from `PyPI`__ manually, unpack
33
python setup.py install
35
A note for Windows users
36
~~~~~~~~~~~~~~~~~~~~~~~~
38
There are eggs available from the same source too. With these eggs, the
39
extension module comes pre-built. However, you still need to fetch
40
`discid.dll` from :musicbrainz:`libdiscid` and copy the DLL to somewhere it can
41
be found, e.g. in ``C:\WINDOWS\system32``.
43
.. __: https://pypi.python.org/pypi/python-libdiscid/
44
.. __: https://pypi.python.org/pypi/python-libdiscid/
46
Building python-libdiscid locally
47
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
If you just want to try `python-libdiscid` without installing, please note that
50
per default `setuptools` will build the extension module in ``build/lib.*`` and
51
doesn't copy it to ``libdiscid``. There are many possible ways to work with this
56
python setup.py build_ext -i
58
will copy the extension modules to ``libdiscid`` and one can hack right away.
60
* Use `setuptools` ``develop`` command. Please read `setuptools`'s
61
`documentation`__ for further information.
63
* If you build with ``python setup.py build``, It is also possible to put
64
``build/lib.*`` before the source directory of `python-libdiscid` in
65
``sys.path``. Assuming that `python-libdiscid` is built on a 64 bit Linux and
66
for `Python` 3.2, one can use the following lines to achieve that::
69
sys.path.insert(0, os.path.abspath('build/lib.linux-x86_64-3.2'))
72
Please note that modification to any file in the ``libdiscid`` directory will
73
only be available after another run of ``python setup.py build``.
75
.. __: http://pythonhosted.org/distribute/setuptools.html#development-mode