sysutils/py-puremagic: import py-puremagic-1.15

Packaged for wip by Olaf Seibert and myself.

puremagic is a pure python module that will identify a file based off its
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.
This commit is contained in:
wiz 2023-06-01 16:02:57 +00:00
parent 46436f3938
commit 179b1b2b44
4 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,13 @@
puremagic is a pure python module that will identify a file based off its
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.

View file

@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.1 2023/06/01 16:02:57 wiz Exp $
DISTNAME= puremagic-1.15
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= sysutils python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/puremagic/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/cdgriffith/puremagic
COMMENT= Pure python implementation of magic file detection
LICENSE= gnu-lgpl-v3
TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27
TEST_ENV+= PYTHONPATH=${WRKSRC}/build/lib
do-test:
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,15 @@
@comment $NetBSD: PLIST,v 1.1 2023/06/01 16:02:57 wiz Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
${PYSITELIB}/puremagic/__init__.py
${PYSITELIB}/puremagic/__init__.pyc
${PYSITELIB}/puremagic/__init__.pyo
${PYSITELIB}/puremagic/__main__.py
${PYSITELIB}/puremagic/__main__.pyc
${PYSITELIB}/puremagic/__main__.pyo
${PYSITELIB}/puremagic/magic_data.json
${PYSITELIB}/puremagic/main.py
${PYSITELIB}/puremagic/main.pyc
${PYSITELIB}/puremagic/main.pyo

View file

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1 2023/06/01 16:02:57 wiz Exp $
BLAKE2s (puremagic-1.15.tar.gz) = 6446e18d0c6d3ad75dc878becc032598154d8afee2ff5126867471d8699a1df1
SHA512 (puremagic-1.15.tar.gz) = 09aec637380bde0ad4eb82395aac3876870e80b0392ff82149942b97e00b9ee1570edc16d9473c5b0ca436b6a906eda559b2d74be6122a3fbc3f52c2e44d7f94
Size (puremagic-1.15.tar.gz) = 297469 bytes