Date: Sun, 9 Jan 2022 21:13:38 GMT From: Max Brazhnikov <makc@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: de71112c7a82 - main - sysutils/py-puremagic: add new port Message-ID: <202201092113.209LDcc9092003@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by makc: URL: https://cgit.FreeBSD.org/ports/commit/?id=de71112c7a823162620d934bb8a416ea7a3b888a commit de71112c7a823162620d934bb8a416ea7a3b888a Author: Max Brazhnikov <makc@FreeBSD.org> AuthorDate: 2022-01-09 21:11:26 +0000 Commit: Max Brazhnikov <makc@FreeBSD.org> CommitDate: 2022-01-09 21:11:26 +0000 sysutils/py-puremagic: add new port Pure python implementation of magic file detection. PR: 258593 Submitted by: James French --- sysutils/Makefile | 1 + sysutils/py-puremagic/Makefile | 23 +++++++++++++++++++++++ sysutils/py-puremagic/distinfo | 3 +++ sysutils/py-puremagic/pkg-descr | 12 ++++++++++++ 4 files changed, 39 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index ba4175878160..530a3bb5ada4 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1061,6 +1061,7 @@ SUBDIR += py-psutil SUBDIR += py-psutil121 SUBDIR += py-ptyprocess + SUBDIR += py-puremagic SUBDIR += py-py-cpuinfo SUBDIR += py-python-consul SUBDIR += py-python-consul2 diff --git a/sysutils/py-puremagic/Makefile b/sysutils/py-puremagic/Makefile new file mode 100644 index 000000000000..41d6ec8ae468 --- /dev/null +++ b/sysutils/py-puremagic/Makefile @@ -0,0 +1,23 @@ +PORTNAME= puremagic +PORTVERSION= 1.11 +CATEGORIES= sysutils python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= james@french.id.au +COMMENT= Pure python implementation of magic file detection + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} + +USES= python:3.7-3.9 +USE_PYTHON= autoplist concurrent distutils + +USE_GITHUB= yes +GH_ACCOUNT= cdgriffith + +do-test: + cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= test/ + +.include <bsd.port.mk> diff --git a/sysutils/py-puremagic/distinfo b/sysutils/py-puremagic/distinfo new file mode 100644 index 000000000000..abb6e12774a3 --- /dev/null +++ b/sysutils/py-puremagic/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1641759315 +SHA256 (cdgriffith-puremagic-1.11_GH0.tar.gz) = 9a4b519c6c5dac587ec26d27dc07bb2d8d9d3e31549060c315741ad9788254fd +SIZE (cdgriffith-puremagic-1.11_GH0.tar.gz) = 295026 diff --git a/sysutils/py-puremagic/pkg-descr b/sysutils/py-puremagic/pkg-descr new file mode 100644 index 000000000000..d3f16fb044a1 --- /dev/null +++ b/sysutils/py-puremagic/pkg-descr @@ -0,0 +1,12 @@ +Puremagic is a python module that will identify a file from magic numbers. + +It is designed to be minimalistic and inherently cross platform compatible. +It is also designed to be a stand in for python-magic, it incorporates the +functions from_file(filename[, mime]) and from_string(string[, mime]) +however the magic_file() and magic_string() are more powerful and will also +display confidence and duplicate matches. + +It does NOT try to match files off non-magic string. In other words it will +not search for a string within a certain window of bytes like others might. + +WWW: https://pypi.org/project/puremagic/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201092113.209LDcc9092003>