Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Dec 2014 04:04:34 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r375307 - in head/devel: . py-filemagic py-filemagic/files
Message-ID:  <201412230404.sBN44Ywu065027@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Tue Dec 23 04:04:33 2014
New Revision: 375307
URL: https://svnweb.freebsd.org/changeset/ports/375307
QAT: https://qat.redports.org/buildarchive/r375307/

Log:
  [NEW] devel/py-filemagic: Python API for libmagic
  
  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

Added:
  head/devel/py-filemagic/
  head/devel/py-filemagic/Makefile   (contents, props changed)
  head/devel/py-filemagic/distinfo   (contents, props changed)
  head/devel/py-filemagic/files/
  head/devel/py-filemagic/files/patch-magic_api.py   (contents, props changed)
  head/devel/py-filemagic/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Tue Dec 23 03:50:51 2014	(r375306)
+++ head/devel/Makefile	Tue Dec 23 04:04:33 2014	(r375307)
@@ -3726,6 +3726,7 @@
     SUBDIR += py-fake-factory
     SUBDIR += py-fam
     SUBDIR += py-fastimport
+    SUBDIR += py-filemagic
     SUBDIR += py-fileutils
     SUBDIR += py-five.customerize
     SUBDIR += py-five.formlib

Added: head/devel/py-filemagic/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-filemagic/Makefile	Tue Dec 23 04:04:33 2014	(r375307)
@@ -0,0 +1,39 @@
+# 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>

Added: head/devel/py-filemagic/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-filemagic/distinfo	Tue Dec 23 04:04:33 2014	(r375307)
@@ -0,0 +1,2 @@
+SHA256 (filemagic-1.6.tar.gz) = e5f932ee172a2c13c91eba998be480c0d02fe9d1588f2a050d942268fb4f6a83
+SIZE (filemagic-1.6.tar.gz) = 16839

Added: head/devel/py-filemagic/files/patch-magic_api.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-filemagic/files/patch-magic_api.py	Tue Dec 23 04:04:33 2014	(r375307)
@@ -0,0 +1,11 @@
+--- magic/api.py.orig	2014-12-23 03:21:58 UTC
++++ magic/api.py
+@@ -9,7 +9,7 @@ import ctypes
+ import platform
+ import warnings
+ 
+-libname = ctypes.util.find_library('magic')
++libname = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1')
+ if not libname:
+     if platform.system() == 'SunOS':
+         libname = 'libmagic.so'

Added: head/devel/py-filemagic/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-filemagic/pkg-descr	Tue Dec 23 04:04:33 2014	(r375307)
@@ -0,0 +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.
+
+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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412230404.sBN44Ywu065027>