Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Mar 2016 04:05:33 +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: r410159 - in head/textproc/py-chardet: . files
Message-ID:  <201603050405.u2545Xep053069@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Sat Mar  5 04:05:33 2016
New Revision: 410159
URL: https://svnweb.freebsd.org/changeset/ports/410159

Log:
  textproc/py-chardet: Enable concurrent, Modernize
  
  - Enable "concurrent" Python installation
  - Switch to GITHUB for DISTFILES (includes tests)
  - Add test target
  - Patch setup.py and test.py to support setuptools 'test' command
  - Enable NO_ARCH (architecture independent)
  
  [1] https://github.com/chardet/chardet/issues/13
  
  Reviewed by:		rm (maintiner)
  Approved by:		rm (maintainer)
  Differential Revision:	D5517

Added:
  head/textproc/py-chardet/files/
  head/textproc/py-chardet/files/patch-setup.py   (contents, props changed)
  head/textproc/py-chardet/files/patch-test.py   (contents, props changed)
Modified:
  head/textproc/py-chardet/Makefile
  head/textproc/py-chardet/distinfo

Modified: head/textproc/py-chardet/Makefile
==============================================================================
--- head/textproc/py-chardet/Makefile	Sat Mar  5 02:04:54 2016	(r410158)
+++ head/textproc/py-chardet/Makefile	Sat Mar  5 04:05:33 2016	(r410159)
@@ -3,8 +3,8 @@
 
 PORTNAME=	chardet
 PORTVERSION=	2.3.0
+PORTREVISION=	1
 CATEGORIES=	textproc python
-MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	rm@FreeBSD.org
@@ -13,7 +13,15 @@ COMMENT=	Universal encoding detector for
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose
+
 USES=		python
-USE_PYTHON=	autoplist distutils
+USE_GITHUB=	yes
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
 
 .include <bsd.port.mk>

Modified: head/textproc/py-chardet/distinfo
==============================================================================
--- head/textproc/py-chardet/distinfo	Sat Mar  5 02:04:54 2016	(r410158)
+++ head/textproc/py-chardet/distinfo	Sat Mar  5 04:05:33 2016	(r410159)
@@ -1,2 +1,2 @@
-SHA256 (chardet-2.3.0.tar.gz) = e53e38b3a4afe6d1132de62b7400a4ac363452dc5dfcf8d88e8e0cce663c68aa
-SIZE (chardet-2.3.0.tar.gz) = 164346
+SHA256 (chardet-chardet-2.3.0_GH0.tar.gz) = afb95679fb687fad167a714d929d033e3dd0d64b66d3646eecf117d350ae40cc
+SIZE (chardet-chardet-2.3.0_GH0.tar.gz) = 2035957

Added: head/textproc/py-chardet/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/py-chardet/files/patch-setup.py	Sat Mar  5 04:05:33 2016	(r410159)
@@ -0,0 +1,11 @@
+--- setup.py.orig	2014-10-07 15:03:14 UTC
++++ setup.py
+@@ -36,4 +36,7 @@ setup(name='chardet',
+                     "Modules"),
+                    "Topic :: Text Processing :: Linguistic"],
+       packages=['chardet'],
+-      entry_points={'console_scripts': ['chardetect = chardet.chardetect:main']})
++      entry_points={'console_scripts': ['chardetect = chardet.chardetect:main']},
++      tests_require=['nose'],
++      test_suite='nose.collector',
++)

Added: head/textproc/py-chardet/files/patch-test.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/py-chardet/files/patch-test.py	Sat Mar  5 04:05:33 2016	(r410159)
@@ -0,0 +1,16 @@
+--- test.py.orig	2014-10-07 15:03:14 UTC
++++ test.py
+@@ -36,11 +36,8 @@ class TestCase(unittest.TestCase):
+ 
+ def main():
+     suite = unittest.TestSuite()
+-    if len(sys.argv) > 1:
+-        base_path = sys.argv[1]
+-    else:
+-        base_path = os.path.join(
+-            os.path.dirname(os.path.abspath(__file__)), 'tests')
++    base_path = os.path.join(
++        os.path.dirname(os.path.abspath(__file__)), 'tests')
+     for encoding in os.listdir(base_path):
+         path = os.path.join(base_path, encoding)
+         if not os.path.isdir(path):



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