From owner-svn-ports-all@FreeBSD.ORG Tue Dec 23 04:04:36 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5594463F; Tue, 23 Dec 2014 04:04:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36B2E66662; Tue, 23 Dec 2014 04:04:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN44aLp065032; Tue, 23 Dec 2014 04:04:36 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN44Ywu065027; Tue, 23 Dec 2014 04:04:34 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201412230404.sBN44Ywu065027@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Tue, 23 Dec 2014 04:04:34 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 04:04:36 -0000 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 +# $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 + +.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 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