Python bindings for libdiscid
Project description
libdiscid Python bindings
python-libdiscid implements Python >= 3.6 bindings for libdiscid using Cython.
Dependencies
- libdiscid
- Cython (>= 0.15, optional)
- pkgconfig (optional)
Note that the tarballs come with pre-built C source for the Cython module. So Cython is only required if one builds python-libdiscid from the git repository or if one wants to change anything in the Cython module.
If pkgconfig is installed, setup.py uses libdiscid's pkg-config information to set include directories, libraries to link, etc.
Quick installation guide
python-libdiscid is available in some distributions:
- Debian/Ubuntu:
apt-get install python3-libdiscid
(Python 3) - Fedora:
dnf install python3-libdiscid
(Python 3)
python-libdiscid can be installed via pip
:
$ pip install python-libdiscid
or by running:
$ python3 setup.py install
If you just want to try it locally, run:
$ python3 setup.py build_ext -i
and hack right away. You can also run:
$ python3 setup.py build
but please make sure that build/lib.*
is in sys.path
before the source
folder.
A note for Windows users
There are eggs available from PyPI that don't require the extension module to be
built. If these are used, it is still required to drop a working discid.dll in
C:\WINDOWS\system32
(or wherever it can be found).
Usage
from libdiscid import read
disc = read("/dev/cdrom")
print("id: {}".format(disc.id))
License
python-libdiscid is released under the MIT license. Check LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for python_libdiscid-2.0.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38ddbb72bf6ff471c85607f26cd5835ed5826862b6eaefe9e7093968f57767f |
|
MD5 | e3cf80353d58f0786373c767df04535c |
|
BLAKE2b-256 | 6d1da99fa4493af55183db2901b6767c43de240fdaed38eb979e7881cc06bb42 |
Hashes for python_libdiscid-2.0.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b979420be8c42bd7889f110269cfc7c8852fc57ff041e5dfd274ca19c281f7 |
|
MD5 | 66c249caaf16d0e993dbe76f4f00ee11 |
|
BLAKE2b-256 | 76d3c410b98e9de56a108b797d5a6ac8a4a38dc1966137713348e0dd39a7c674 |
Hashes for python_libdiscid-2.0.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 568565b5ff73c27206a6b0b4438dd3785063e4fe1cd1572db214eb8f89ad8211 |
|
MD5 | 658a8a06e67dbf4c075ab02c8adad1cd |
|
BLAKE2b-256 | b47e24af3757e0fe876ee8e0db594f2e9e27771b4ab1eee96d0d667c1bdd80bf |