Skip to main content

Python bindings for libdiscid

Project description

python-libdiscid implements Python 3 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 Expat license. Check LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-libdiscid-1.2.tar.gz (78.8 kB view details)

Uploaded Source

File details

Details for the file python-libdiscid-1.2.tar.gz.

File metadata

  • Download URL: python-libdiscid-1.2.tar.gz
  • Upload date:
  • Size: 78.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for python-libdiscid-1.2.tar.gz
Algorithm Hash digest
SHA256 b39ebfab14da5260db972e170dddbf6c8a61475066bc05563aec39fbe483a0c7
MD5 257909ffb6940d5709dcff200e231362
BLAKE2b-256 488adebc7b8c9081d1e50c2684bb9c5d7a7ce751bad4f61189a9f979cc9e4080

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page