diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2014-12-23 04:04:33 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2014-12-23 04:04:33 +0000 |
commit | fb441f42c21cd746cfca21d1123104353415b253 (patch) | |
tree | bf5db482475741759c8cb7aea08b7ea63ed58412 /devel | |
parent | cfdba183b3e196422cb4316448691d40cc661d75 (diff) | |
download | ports-fb441f42c21cd746cfca21d1123104353415b253.tar.gz ports-fb441f42c21cd746cfca21d1123104353415b253.zip |
Notes
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/py-filemagic/Makefile | 39 | ||||
-rw-r--r-- | devel/py-filemagic/distinfo | 2 | ||||
-rw-r--r-- | devel/py-filemagic/files/patch-magic_api.py | 11 | ||||
-rw-r--r-- | devel/py-filemagic/pkg-descr | 14 |
5 files changed, 67 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 48bc32f7c5b5..12399c85e102 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -3726,6 +3726,7 @@ SUBDIR += py-fake-factory SUBDIR += py-fam SUBDIR += py-fastimport + SUBDIR += py-filemagic SUBDIR += py-fileutils SUBDIR += py-five.customerize SUBDIR += py-five.formlib diff --git a/devel/py-filemagic/Makefile b/devel/py-filemagic/Makefile new file mode 100644 index 000000000000..36ce713a2a85 --- /dev/null +++ b/devel/py-filemagic/Makefile @@ -0,0 +1,39 @@ +# Created by: Kubilay Kocak <koobs@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= filemagic +PORTVERSION= 1.6 +CATEGORIES= devel python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs@FreeBSD.org +COMMENT= Python API for libmagic, the library behind the Unix file command + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock + +OPTIONS_DEFINE= TESTS + +TESTS_DESC= Install test suite requirements +TESTS_BUILD_DEPENDS= ${TEST_DEPENDS} + +USES= python +USE_GITHUB= yes +USE_PYTHON= autoplist distutils + +GH_ACCOUNT= aliles +GH_TAGNAME= ${GH_COMMIT} +GH_COMMIT= b24df9f + +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 300 +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}unittest2>0:${PORTSDIR}/devel/py-unittest2 +.endif + +regression-test: build + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test + +.include <bsd.port.post.mk> diff --git a/devel/py-filemagic/distinfo b/devel/py-filemagic/distinfo new file mode 100644 index 000000000000..a3434359b0ef --- /dev/null +++ b/devel/py-filemagic/distinfo @@ -0,0 +1,2 @@ +SHA256 (filemagic-1.6.tar.gz) = e5f932ee172a2c13c91eba998be480c0d02fe9d1588f2a050d942268fb4f6a83 +SIZE (filemagic-1.6.tar.gz) = 16839 diff --git a/devel/py-filemagic/files/patch-magic_api.py b/devel/py-filemagic/files/patch-magic_api.py new file mode 100644 index 000000000000..e7b0dbe82a52 --- /dev/null +++ b/devel/py-filemagic/files/patch-magic_api.py @@ -0,0 +1,11 @@ +--- magic/api.py.orig 2014-12-23 03:21:58 UTC ++++ magic/api.py +@@ -9,7 +9,7 @@ import ctypes + import platform + import warnings + +-libname = ctypes.util.find_library('magic') ++libname = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1') + if not libname: + if platform.system() == 'SunOS': + libname = 'libmagic.so' diff --git a/devel/py-filemagic/pkg-descr b/devel/py-filemagic/pkg-descr new file mode 100644 index 000000000000..db57d4841144 --- /dev/null +++ b/devel/py-filemagic/pkg-descr @@ -0,0 +1,14 @@ +filemagic provides a Python API for libmagic, the library behind Unix file +command. It enables the Python developer to easilty test for file types from +the extensive identification library that is shipped with libmagic. + +Features: + + * Simple, Python API + * Identifies named files or strings + * Return a textual description, mime type or mime encoding + * Provide custom magic files to customize file detection + * Support for both Python2 and Python3 + * Support for both CPython and PyPy + +WWW: https://filemagic.readthedocs.org |