From nobody Sun Jan 9 21:13:38 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4B962193B8DB; Sun, 9 Jan 2022 21:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JX8nt64Pcz4WSK; Sun, 9 Jan 2022 21:13:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB78119417; Sun, 9 Jan 2022 21:13:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 209LDcRL092004; Sun, 9 Jan 2022 21:13:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 209LDcc9092003; Sun, 9 Jan 2022 21:13:38 GMT (envelope-from git) Date: Sun, 9 Jan 2022 21:13:38 GMT Message-Id: <202201092113.209LDcc9092003@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Max Brazhnikov Subject: git: de71112c7a82 - main - sysutils/py-puremagic: add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: makc X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de71112c7a823162620d934bb8a416ea7a3b888a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641762818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5bC5AnkHf5x0sa84fcNatxvq1bezMgZr2QLaf0TuIc=; b=S8Zn+DbwtkZ9+GCXP38KGqRb2C1hfLykUp728qUVAGCoU1kVyvdrT0VciaOCEJeD1Zls8B 73uVcqAH4lUmhqUPdfPRYquOMA9QU3p/YFq8yGwqR3DrLmg8CEJul2qq/EhiabMuGkOUPd U+g+3K0ePrBwqwo+lz99bbPN1gKiKJPT7+jO3hM7BYBRSuPUkR6IXIu+OrLWPmkRXnAQTB wo7cv5Ubbzuc65YGNFnn+h0KYpavOEnKf+/kHKif5+M4j3y4qP37GNwexd2/38reYgDGN9 O/L1UKZkX43J3rJ25+7PA58uwZGjx7JFZguShZ28/oOQ8rr3e97M8PqIbFQEsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641762818; a=rsa-sha256; cv=none; b=sAgMXCw5iflZ+50pGj+uJ3HNsGzKZzEPSxkYTpHCkwNAC7gAuGoptVVpYxw88o9WG5LvOD ehpA5A9MbX/HuQkKyk4ggN82HDq35CvBRjFTlBvYzb879txETnztMcMnI5X8Igzn2NiFHG YDpyX3qOspdSaPQnC3ZEG4hvyFIr+NdhY+EMbmyvCSya8bWz74xjUVddCGRyE9Pvi2DNuv FKGmMtswtadpr73cYMOOO5GGnibE0aRpALhg/l1LCmBOlXEt6Mx7HbTgo1hPGdRTLud0cE qdiiyAkrl7fCE6Lmzi9bWlZoO3KywErOnrWc71SXamA9FFITfc9+3Q9o3oD+5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by makc: URL: https://cgit.FreeBSD.org/ports/commit/?id=de71112c7a823162620d934bb8a416ea7a3b888a commit de71112c7a823162620d934bb8a416ea7a3b888a Author: Max Brazhnikov AuthorDate: 2022-01-09 21:11:26 +0000 Commit: Max Brazhnikov 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 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/