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.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distributions

pylibmagic-0.2.2-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.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibmagic-0.2.2-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.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibmagic-0.2.2-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.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibmagic-0.2.2-cp311-cp311-musllinux_1_1_x86_64.whl (657.6 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pylibmagic-0.2.2-cp311-cp311-macosx_10_9_x86_64.whl (693.5 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pylibmagic-0.2.2-cp311-cp311-macosx_10_9_universal2.whl (693.5 kB view details)

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

pylibmagic-0.2.2-cp310-cp310-musllinux_1_1_x86_64.whl (657.6 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.2-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.2-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.2-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.2-cp39-cp39-musllinux_1_1_x86_64.whl (657.6 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.2-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.2-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.2-cp39-cp39-macosx_10_9_universal2.whl (693.6 kB view details)

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

pylibmagic-0.2.2-cp38-cp38-musllinux_1_1_x86_64.whl (657.6 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

pylibmagic-0.2.2-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.2-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.2-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.2-cp37-cp37m-musllinux_1_1_x86_64.whl (657.6 kB view details)

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

pylibmagic-0.2.2-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.2-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.2.tar.gz.

File metadata

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

File hashes

Hashes for pylibmagic-0.2.2.tar.gz
Algorithm Hash digest
SHA256 17551b5259db4045c63e595577d42df172e35147e26160a47f4a5ba3933281e7
MD5 ac3bc51875a994b0cecd75ceeb74ba16
BLAKE2b-256 54b6d732dccb2d98c3d78f4112b8b1bd55115ed163d6a3532b227ecb2b143d5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 486141df09c50945b8f63b57b4855f9d3c30a070e81a9dea05bd68ae6c6cdc9d
MD5 643fd2204940e706f01cce93f881482e
BLAKE2b-256 d5acc4e3df69bccc55d9b730df82ccb508130d2eaa93d7692ae1ca9ab2688968

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 78f7712afd32ff308fb1f5b8cd5144deacd55fd2f68e14fea62dd353f22b63ba
MD5 cce3815c7e2b769e0b7921550610cb59
BLAKE2b-256 74be85ef2b412f0133480ca51d67ea55fa144d41348710af12cf8b8250769941

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4da8f152cb8c296cae83fce3fc6ea4d4b0be27120ae320004fb4688b15f6b21
MD5 abc7d40f0fdddc97a03526d84c15f388
BLAKE2b-256 cf388f2cb0bf4f11cccab0293724f7ab8e247c6f049cc28c1b5a69cbd512bfc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c4159c8536eff68c806f642994627ab805839b24ef35cfb88591e0e02fde46b2
MD5 e83a3c292b163deca4d007fcc0b8bd89
BLAKE2b-256 802755843c2c521bf9ee9427c36544cec74c77cacbe9ba9300ad64fc7671d3a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d4b3b17d5c7b966ee1e3d8ec820d6472b7c045a3617785a9a3e93185ae8748c
MD5 8a93bf818b6996b750e489646211dec8
BLAKE2b-256 c0d1f6c6866db25b3044291daa34293a2728444aecf3e60ea35eecb614508542

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a860a1ce1bdfd64b402a1161c62c96a07b1b5d9cfba3fa326cd53303c2a6f8e
MD5 e7bf4e3a387c7abf59509c28031beb58
BLAKE2b-256 c05ec7fbb87b66dc896b54ba67796b2d0a19267d55430378a65e889c30141b2b

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.2-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 7c23baa784ae3b2928baa92e1805da9fd71db3ebc189cd9a775b287e834fc0d8
MD5 e38690aa79f1ee49ba3d87057997f45f
BLAKE2b-256 d68204415a6c0a139bf078204e4cab05d6cea218d3a6cfd94db27550c7842cbe

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 767fcea06cc32800561b4a8d0225557655f7c6082ede20e6974f9c89b20cfd49
MD5 d70b79d83bb53708781f4a1e246200bc
BLAKE2b-256 cc345a49b36c3b518958afd0c066cc446022af0864a972f96011923d5b33611f

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e9d980cc32d16dae961b9d4d601ca879ac0500c56a3aff93360e35f32e038d38
MD5 a97dc69102bc30ad609f4c7608813267
BLAKE2b-256 8253ca1cb2999d24a974e368a0822e9e817456c47e4e347d10730f0c24de2d99

See more details on using hashes here.

File details

Details for the file pylibmagic-0.2.2-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0637980ea64afe8dcd644ba237c4c18bcfc52e2bff4120565acdb3ff1f97c410
MD5 de089a9075f9dd9a2dbea6c56a2b5503
BLAKE2b-256 0157f942146b45daee42d206683b64e14e80018cd87c67fb11a07f94036bc35f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 419c0be3f5b8a2f80d536c7a4629a9dce0763490f977ace8d3b5e51dcfae1b6b
MD5 b89f29ffeb0bec7fbb4a26207c7eac04
BLAKE2b-256 e2a9b53749fd9da2e758b3dd6de6364739608b4576783aaa7f6886beab9d1173

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f33db966ede2f1b2bbb8f5c2acb9b40b5dbcceb1d5b192c889e26c5a3487e52
MD5 1cada983dd311d0a6f6a237b78c8ee37
BLAKE2b-256 4d1dca954658def603245d66e591f8f4b0f4279c07bd1286f921ef03e6aa536b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 70e8f762e32c5c390e8318092ecaa652fd0710daca07692fb33db39829bbbc68
MD5 d7f8751dac7a7ae0c02b278b725fb307
BLAKE2b-256 31bab54b9b4d6fe3ae6133e769a5ff5afe2263a8574e1bdc14541cf16ebf9671

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4ea9bd565ef4d02e6342f112a336d631a24a62824e95f28276ed6216a96362db
MD5 e136b94da4f4e0bf769de39d6ad2c5c3
BLAKE2b-256 646cb8f95e89b00d9e2a19cbdac732f2f06df58b40aa0b88001114da05d1d288

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5855b0b0a22fc4041e3b01c15978dd317fbd2efa09b8b19ed13c322e1cf0b71e
MD5 28fe761b6962f8f9287542221aaf55c6
BLAKE2b-256 c4338f4533ad26504846f14b05f575fb667cd2ff30ef3f662bcf6ca1314bd070

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 366bbcd075a49b0ce5f96ebc02a4d23a9e87abf7b5c51e7b7b4456c68cace4d6
MD5 67f0d9ec00f64193b055df56f11dfb87
BLAKE2b-256 977776e2db49c9f01f9a1aed671d0a24d47a3c340ab2d99e44f975c7a9f7e253

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8cace3e302c2afe2ca9b5e0e3e70b78a27a60584f2112ccfaedd1675089920c5
MD5 24745b03ea3aa1be330851b524f57611
BLAKE2b-256 e89933d69eab0ff37f2eb165739128f67724c78f88ba6f3e95412f30bd917139

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 60c09f8937a216fb509713b70d42fa5cac2b363fb5a309ebbc347c2f48df3ee4
MD5 8fe748616a5a9f2cbcaad3a232ef75b4
BLAKE2b-256 b93bb3053ebebfe1a198af82605fa7eb65d06aa829745689245c645da564c4a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 19a68bead3ca27fd9e2933a16617ddad84afa3d1e0e9ba36ff3656a6a9834ab8
MD5 245e9c80cf43d026a8b6f747210b753c
BLAKE2b-256 fb7e6ffd52dfbb6bd51736a0f2bdac8da3155b0d15480e71f25c6d9868d8453b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7a5e15e349d54a69aaf5ec40805294f8763669e7261788052c1dd52cdb986801
MD5 7683ee18335096ba6f7410118185cd0b
BLAKE2b-256 89d8b9c3edf1a020846e771fd3d736d6115e516a4de03812b0e44a6ab7d12b97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 84e0b64a35e628babd5b98be3fe5e66369cf3246165c25199e232d622d4f9b9f
MD5 b5262a4c33bc79d799b8ed9c49ba2568
BLAKE2b-256 a8ef3007b2e1317e7caceab80499a51dcc011900d718a4cba35a5feecd5cd90a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fd383480c1bc52a98e79e4274f2d99e396dd6a73610d8f313174aa605546d8b9
MD5 6afe0284f1e6af4192b51f735e9c1779
BLAKE2b-256 3909487037304c048de32469eb620f1aac71a10883e1072c11f48fb604df4c68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 741988a8b32a9f7b1b89c02cbfae8316466de3d1a43550d6f34dfd42a02eefe0
MD5 58c3db1dfc562afe106587ce74c08d9f
BLAKE2b-256 31bccd65eefd5011755b7f6e10f380f8ed66417e4fa5f0eebf9d038ed62ec256

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb38292423f8c1991f4d7a091e2814cff9dff0441856874237c99d4cee51e3e5
MD5 2e8ae2f3a1da030001d8b9bfbc2a4b6e
BLAKE2b-256 9f86ffdc4d92dcf4cc9c4904888fa9c26b3c1cd1c6b2905c8ddf29311c164c78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibmagic-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5921c68f59532a9af2a42761e13d7de17b9c72027c9d046b7bf070e2997e639e
MD5 50d62a60b382145503ec66ff55795d49
BLAKE2b-256 e165b64a820a0f5473a9e7d242a654f3cee93bdd0e74b3f638ad9a76660f9abf

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