Skip to main content

scikit-build project with CMake for compiling libmagic

Project description

A lightweight, minimal python package that ships magic libraries using automake, CMake, scikit-build, and cibuildwheel.

Actions Status Documentation Status Code style: black

PyPI version Conda-Forge PyPI platforms

GitHub Discussion Gitter

Why?

If you use python-magic, you typically get an error like this

>>> import magic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kratsg/.pyenv/versions/venv/lib/python3.7/site-packages/magic/__init__.py", line 209, in <module>
    libmagic = loader.load_lib()
  File "/Users/kratsg/.pyenv/versions/venv/lib/python3.7/site-packages/magic/loader.py", line 49, in load_lib
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

which is frustrating because they don’t ship shared lib with their python distribution. pylibmagic helps fill in the missing gap by shipping the required magic library and adding it to your path, so you can just do:

>>> import pylibmagic
>>> import magic

and be on your way. pylibmagic is designed to be very minimal and lightweight.

Compiling

$ docker run -it --rm -v $PWD:/home/root -w /home/root ubuntu
# apt install cmake autoconf automake libtool build-essential git python3-dev python3-pip
# cmake -S . -B build
# cmake --build build

Installing

$ python3 -m pip install pylibmagic

and the libraries are installed at

$ python -c "import pylibmagic; print(pylibmagic.data)"

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

pylibmagic-0.2.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distributions

pylibmagic-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibmagic-0.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibmagic-0.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibmagic-0.2.1-cp310-cp310-musllinux_1_1_x86_64.whl (657.5 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pylibmagic-0.2.1-cp310-cp310-macosx_10_9_universal2.whl (693.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

pylibmagic-0.2.1-cp39-cp39-musllinux_1_1_x86_64.whl (657.5 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pylibmagic-0.2.1-cp39-cp39-macosx_10_9_universal2.whl (693.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

pylibmagic-0.2.1-cp38-cp38-musllinux_1_1_x86_64.whl (657.5 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pylibmagic-0.2.1-cp38-cp38-macosx_10_9_universal2.whl (693.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

pylibmagic-0.2.1-cp37-cp37m-musllinux_1_1_x86_64.whl (657.5 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

pylibmagic-0.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.1-cp37-cp37m-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file pylibmagic-0.2.1.tar.gz.

File metadata

  • Download URL: pylibmagic-0.2.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pylibmagic-0.2.1.tar.gz
Algorithm Hash digest
SHA256 86b5321ea4b56cccf174e9be3935058b720c8c8b7d0df25d8b2dd714ab610aaa
MD5 9c0fdfe243561d53398ba49ed0ba3309
BLAKE2b-256 1d34cb656012b732f80b27ced0964c2dba78eb3a48be466bf0fefdf7854317e9

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99e2f8425a5c209b9c58490a60fff8609e3e7ea3aef7d02fca60689e918ee2b1
MD5 349c7984ce3b133108150cbb4f0109d5
BLAKE2b-256 a3cb65e818f37d8f3ce2c701562368c97d0cab8ce061c101aa29b687f34e1d40

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 25bfc408cf5bb1854f3d70b25e391f65626b28e3f3cbd8ac5fe8794a616df349
MD5 7b20da506bef018683aaa19812987780
BLAKE2b-256 b14e098a392ee76c53850918279595901fad1cf932e37d3da54f2e3a46f436b9

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7570c685d666802c2a5b76dfe23c1a4154ccf8a4d537034885833c067dbd73a
MD5 133ffd0997bed952cd26193cd7e9e4bc
BLAKE2b-256 7af795ba3a5b24938c5ebe309d1848da36539c8433a09d74794eb0942c6d39a1

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dd7e52a8dc06244feaf760e2272981816a72c42e3c476ce22ab157692043d52f
MD5 557a934a94e12e5d0fd54dcc9b0bc93a
BLAKE2b-256 abdaa6250982147e2b51dbfea1c2a2787351feb2695fb108dfb89dfe831c6b5f

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e200366540967974bda1b15d159b7cc8380e0594c0845d82b100d26b41c7fee0
MD5 49f921751b3f31c698657999bdf07cd4
BLAKE2b-256 aaf857f009f43cc17f0222662869ec5da7c34812b8345bbb2ed6d2f6314112b3

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eec748277294be51f9e19cac3a1e1b04c48aab1d8f4022bf8dee3dafd16dd7d3
MD5 f3b1c8c5ba87b6c1e163e36163890ece
BLAKE2b-256 b75ff0ad74832a2a2d27aa1d1b7e2270c2ad133572f82c81326922d64dcc25d2

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 82a30b85965b9a6ac132efa58342674a9d85c4df67ee5a97839b5b523b33c506
MD5 71a2998ca8b5647589a3fbbd7526e1f6
BLAKE2b-256 0170f5e767fef9923cb5cc4bd329c8b3e4ab8e12a2b1f88831c1fa5dca2f487e

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 63b7d21305682c8e1bfe2a16f3e274b91986c43b6a044ad337689a54fe21d371
MD5 727b267e5248b621dc31ab67c90dd4ab
BLAKE2b-256 bee22cb4009dc0990aeee0ea07fa11c28bb0b986468dda610ae7d25833617ad1

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef80a111b631cf4347f6c66b5f4738fc3a1835ba5121483d8b7bbf6beeafbf30
MD5 a8c9b09041b3d5d323be318eb0bae450
BLAKE2b-256 206a62e89eb4e51fec017e86ac62472b4b8f5494e863f2ba2a7c6aab6f678616

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 87d88dd6a65c9556998c613c7af91de56036985c4892c2271dc7789de70068f1
MD5 35193236117d72482981ece56eaa221a
BLAKE2b-256 db5499f998eb84afd21a80a3c2061dc277ea64311f3f1f728e37afd9a9bd0012

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8a5f2038b10c2d6ca02853cfd1043482bc9fc29897e9ad8b0d64526a057e71f5
MD5 af2a959c038edde9f5953ad87d27106f
BLAKE2b-256 2d4079e27c182baddeb57c78cecd730fbbdb6ddb9b252efa7ed22fe22dcb9541

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72ff53fd3c4e93bccb0e0245334aa9145b03c718c2feafb4ed48bb84931b4284
MD5 f8b82e041c236abeec1e8096f11c2e4e
BLAKE2b-256 843bca8bb604ff724a5e37fd097c3eec1361e3316e27e4b838f0363516dd7fde

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fce5da853cca6590b3d921f0414999df5ca571bdbf2f07d30712c78a504b4be7
MD5 cb46fa3d798a994df2ca9123b436198f
BLAKE2b-256 2d544c61eb64f1e54d56a43690d56386f7bca5917d40203858ac3a04e9a6f102

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d741057254d66ccb85a9a150fc04fbe5888e178370def834c5c030b86b775b97
MD5 587c4006b163d12f1e1c20827d2e1e19
BLAKE2b-256 e99b844fe9c71bd3f8a596081c16b8c3b454f0e09d0f3122067907333df3f6b3

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 276760e44508525b105a300fcdad91588bae5eb2c008dc1d6d3257329d18daa3
MD5 ff6da51af20df5c5ea4e88459aaf8169
BLAKE2b-256 7296e8aedcd9d7e3d27831bf53cfdb1602681c6393f90d8f186b284682047705

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a137f8db5535bbc3d53640fd93736b1f9e193eaf48a243aa31dd378e454a796c
MD5 cb5e05427ed701f88f8d0393c7c830ed
BLAKE2b-256 4df6f68ba0f42c2013e5303da55cc4ed253583a18ef81941a9a993e7ad5f3a21

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 60446188f2167b168bf1f4231239a7ed8277afed76c7f79df0a5a7a074b257ae
MD5 53647ee74092f3f328c4bfcfb4fae118
BLAKE2b-256 019ba0cfe594b6f650736951e020ec0f417bb859914ab9564f684a6423c75b7a

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1e3b24c97830923a1532941a885c0e98043078f7bd6af4bf22d4544f80d67b0a
MD5 e193deced334a510658a11b68a163711
BLAKE2b-256 da31b365988cde7bbd60581a7da1117bb498ba844e065f1c1c8eafdc2e80efaa

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d11a19d40de31bccb51117f5bd8b391a40ac2dee9ab9d3d7d1f563635f836906
MD5 b911ef8d4583bc473e63efb5ec7c3699
BLAKE2b-256 d6c04b177e791a3b1d583a2b252914149593400e814a3cda01862ea558687b57

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2c5a62376b79753f2ebfc4195493be36c1ef9e0daf85a8556e0ae0053aeddd1
MD5 085ed8a24f8c0af8ea475b45111ec305
BLAKE2b-256 7e04191ddc2e04d0e75c0097c53c925b5220296bd394f9f58ffcb0b941872926

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 700de04dc514559355b135746a72e70414d9b791c8c0f7bf0f5a287e5d5fcb51
MD5 5e15370416c4c174b983f28c0bfa9711
BLAKE2b-256 77bd1469976aac2f1d9592fec1715c152731f7dd81e811659a0a05e0e70b0cc9

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