mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
fb441f42c2
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
40 lines
875 B
Makefile
40 lines
875 B
Makefile
# 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>
|