./sysutils/py-magic, File type identification using libmagic

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 0.4.22, Package name: py38-magic-0.4.22, Maintainer: khorben

This module uses ctypes to access the libmagic file type identification
library. It makes use of the local magic database and supports both textual and
MIME-type output.


Required to run:
[sysutils/file] [devel/py-setuptools] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 36808b9a6138d862d0ac3128b936237191499cd0
RMD160: 3a90368e41f15584565321408145ba481e6c3680
Filesize: 16.566 KB

Version history: (Expand)


CVS history: (Expand)


   2021-02-18 13:29:55 by Adam Ciarcinski | Files touched by this commit (5) | Package updated
Log message:
py-magic: updated to 0.4.22

Changes to 0.4.21, 0.4.22

 - Unify dll loader between the standard and compat library, fixing load
 failures on some previously supported platforms.

Changes to 0.4.20

- merge in a compatability layer for the upstream libmagic python binding.
  Since both this package and that one are called 'magic', this compat layer
  removes a very common source of runtime errors.  Use of that libmagic API will
  produce a deprecation warning.

- support python 3.9 in tests and pypi metadata

- add support for magic_descriptor functions, which take a file descriptor
  rather than a filename.

- sometimes the returned description includes snippets of the file, e.g a title
  for MS Word docs.  Since this is in an unknown encoding, we would throw a
  unicode decode error trying to decode.  Now, it decodes with
  'backslashreplace' to handle this more gracefully.  The undecodable characters
  are replaced with hex escapes.

- add support for MAGIC_EXTENSION, to return possible file extensions.

- add mypy typing stubs file, for type checking
   2020-10-04 20:15:43 by Jonathan Schleifer | Files touched by this commit (3)
Log message:
Make sysutils/py-magic work in a chroot on NetBSD
   2020-05-08 15:57:19 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-magic: updated to 0.4.18

Changes in 0.4.18

- Make bindings for magic_[set|get]param optional, and throw NotImplementedError
if they are used but not supported.  Only call setparam() in the constructor if
it's supported. This prevents breakage on CentOS7 which uses an old version of
libmagic.

- Add tests for CentOS 7 & 8

Changes in 0.4.16 and 0.4.17

- add MAGIC_MIME_TYPE constant, use that in preference to MAGIC_MIME internally.
This sets up for a breaking change in a future major version bump where
MAGIC_MIME will change to mathch magic.h.
- add magic.version() function to return library version
- add setparam/getparam to control internal behavior
- increase internal limits with setparam to prevent spurious error on some jpeg files
- various setup.py improvements to declare modern python support
- support MSYS2 magic dlls
- fix warning about using 'is' on an int in python 3.8
- include tests in source distribution

- many test improvements:
-- tox runner support
-- remove deprecated test_suite field from setup.py
-- docker tests that cover all LTS ubuntu versions
-- add test for snapp file identification

- doc improvements
-- document dependency install process for debian
-- various typos
-- document test running process
   2018-03-29 23:18:02 by Pierre Pronchery | Files touched by this commit (1) | Package updated
Log message:
Register missing dependency on sysutils/file

This will fix functionality of this package if libmagic is not available.

Bump PKGREVISION for those platforms where it is the case (NFC otherwise).

Tested on NetBSD/amd64.

Thanks richard@ for the heads up.
   2018-01-14 09:27:52 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-magic: updated to 0.4.15

0.4.15:
Bug fixes.
   2017-09-12 16:40:51 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
sysutils/py-magic: update to 0.4.13

Changes 0.4.13:
add testdata to sdist
   2017-07-31 00:32:28 by Thomas Klausner | Files touched by this commit (229)
Log message:
Switch github HOMEPAGEs to https.
   2016-06-08 19:43:49 by Thomas Klausner | Files touched by this commit (356)
Log message:
Switch to MASTER_SITES_PYPI.