Skip to content

Commit

Permalink
devel/py-filemagic: Change MASTER_SITES from GitHub to CHEESESHOP
Browse files Browse the repository at this point in the history
- Add NO_ARCH
- Clean up Makefile
- Remove outdated patch
- Update do-test:
- Update pkg-descr
- Update WWW
  • Loading branch information
sunpoet committed May 13, 2022
1 parent 06f8da1 commit d019f0a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 38 deletions.
24 changes: 9 additions & 15 deletions devel/py-filemagic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
PORTNAME= filemagic
PORTVERSION= 1.6
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= sunpoet@FreeBSD.org
Expand All @@ -11,23 +12,16 @@ COMMENT= Python API for libmagic, the library behind the Unix file command
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE

TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}

OPTIONS_DEFINE= TESTS

TESTS_DESC= Install test suite requirements
TESTS_BUILD_DEPENDS= ${TEST_DEPENDS}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR}

USES= python:3.6+
USE_GITHUB= yes
USE_PYTHON= autoplist distutils

GH_ACCOUNT= aliles
GH_TAGNAME= b24df9f
USE_PYTHON= autoplist concurrent distutils

.include <bsd.port.pre.mk>
NO_ARCH= yes

regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
do-test:
${MKDIR} ${WRKSRC}/tests/magic
${FETCH_CMD} -o ${WRKSRC}/tests/magic/python https://github.com/aliles/filemagic/raw/master/tests/magic/python
cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD} tests/test_magic.py

.include <bsd.port.post.mk>
.include <bsd.port.mk>
5 changes: 3 additions & 2 deletions devel/py-filemagic/distinfo
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
SHA256 (aliles-filemagic-1.6-b24df9f_GH0.tar.gz) = 776304a453ac4f284e3f94037350a0ab9d21ca093e2e0de8193d6f5c3d5587eb
SIZE (aliles-filemagic-1.6-b24df9f_GH0.tar.gz) = 16819
TIMESTAMP = 1652122635
SHA256 (filemagic-1.6.tar.gz) = e684359ef40820fe406f0ebc5bf8a78f89717bdb7fed688af68082d991d6dbf3
SIZE (filemagic-1.6.tar.gz) = 16754
11 changes: 0 additions & 11 deletions devel/py-filemagic/files/patch-magic_api.py

This file was deleted.

20 changes: 10 additions & 10 deletions devel/py-filemagic/pkg-descr
Original file line number Diff line number Diff line change
@@ -1,14 +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.
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.

* 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
WWW: https://filemagic.readthedocs.io/en/latest/
WWW: https://github.com/aliles/filemagic

0 comments on commit d019f0a

Please sign in to comment.