diff options
author | koobs <koobs@FreeBSD.org> | 2017-07-15 17:15:46 +0800 |
---|---|---|
committer | koobs <koobs@FreeBSD.org> | 2017-07-15 17:15:46 +0800 |
commit | 0245d7e7e7fc066c827f2b92eb07b16f2443c1b3 (patch) | |
tree | b2176d150120b26a969bc9cb3956138e077d0987 /net/turses | |
parent | 7364f0a281129282eae01f12df762b7290989202 (diff) | |
download | freebsd-ports-gnome-0245d7e7e7fc066c827f2b92eb07b16f2443c1b3.tar.gz freebsd-ports-gnome-0245d7e7e7fc066c827f2b92eb07b16f2443c1b3.tar.zst freebsd-ports-gnome-0245d7e7e7fc066c827f2b92eb07b16f2443c1b3.zip |
net/turses: Update to 0.3.1
* Add future, add explicit versions to RUN_DEPENDS
* Add configparser to a conditional RUN_DEPENDS ( < 3.x)
* Remove TESTS option (test framework takes care of installing dependencies)
* No longer restrict to 2.7 (Supports 3.x), add PKGNAMEPREFIX accordingly
* Enable multiple concurrent Python installation (create unique file names)
* Remove bits adding test command to setup.py patch
* Switch to nose instead of pytest for tests
* Update test target (to invoke nose directly) accordingly
* Add NO_ARCH
Diffstat (limited to 'net/turses')
-rw-r--r-- | net/turses/Makefile | 32 | ||||
-rw-r--r-- | net/turses/distinfo | 5 | ||||
-rw-r--r-- | net/turses/files/patch-setup.py | 56 |
3 files changed, 34 insertions, 59 deletions
diff --git a/net/turses/Makefile b/net/turses/Makefile index 63e244d4d6e5..23c4e1fc635c 100644 --- a/net/turses/Makefile +++ b/net/turses/Makefile @@ -2,32 +2,34 @@ # $FreeBSD$ PORTNAME= turses -PORTVERSION= 0.3.0 +PORTVERSION= 0.3.1 CATEGORIES= net python MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= koobs@FreeBSD.org COMMENT= Python Twitter client for the console LICENSE= GPLv3 -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}urwid>0:devel/py-urwid \ - ${PYTHON_PKGNAMEPREFIX}tweepy>=2.2:net/py-tweepy -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest \ - ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}urwid>=1.3.0:devel/py-urwid \ + ${PYTHON_PKGNAMEPREFIX}tweepy>=3.1.0:net/py-tweepy \ + ${PYTHON_PKGNAMEPREFIX}future>=0.14.3:devel/py-future +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock \ + ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose -OPTIONS_DEFINE= TESTS +USES= python +USE_PYTHON= autoplist concurrent distutils -TESTS_DESC= Install test suite requirements -TESTS_BUILD_DEPENDS= ${RUN_DEPENDS} \ - ${TEST_DEPENDS} +NO_ARCH= yes -USES= python:2.7 -USE_PYTHON= autoplist distutils +.include <bsd.port.pre.mk> -NO_ARCH= yes +.if ${PYTHON_REL} < 3000 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}configparser>0:devel/py-configparser +.endif -regression-test: build - @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} -m nose -v -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net/turses/distinfo b/net/turses/distinfo index 645a75b96102..887cafcf17b4 100644 --- a/net/turses/distinfo +++ b/net/turses/distinfo @@ -1,2 +1,3 @@ -SHA256 (turses-0.3.0.tar.gz) = 9b6737655b006a1b03123ea294335170ffa576d3696abcfe6dd2853723d5dcca -SIZE (turses-0.3.0.tar.gz) = 50395 +TIMESTAMP = 1500110128 +SHA256 (turses-0.3.1.tar.gz) = 46a61541d1acd1338561a198b3011081b91f118415c08b111444cdb24685b396 +SIZE (turses-0.3.1.tar.gz) = 50617 diff --git a/net/turses/files/patch-setup.py b/net/turses/files/patch-setup.py index 5e4ce62d1e37..20f625397e02 100644 --- a/net/turses/files/patch-setup.py +++ b/net/turses/files/patch-setup.py @@ -1,53 +1,25 @@ ---- setup.py.orig 2015-07-07 10:35:56 UTC +--- setup.py.orig 2015-08-06 17:43:56 UTC +++ setup.py -@@ -32,6 +32,8 @@ See ``AUTHORS`` for a full list of contr - """ - - from setuptools import setup, find_packages -+from setuptools.command.test import test as TestCommand -+import sys - from sys import version_info - - import turses -@@ -40,13 +42,31 @@ NAME = "turses" +@@ -39,15 +39,17 @@ import turses + NAME = "turses" REQUIREMENTS = [ - "urwid", -- "tweepy==3.1.0", -+ "tweepy>=3.1.0", +- "urwid==1.3.0", +- "tweepy==3.3.0", +- "future==0.14.3", ++ "urwid>=1.3.0", ++ "tweepy>=3.3.0", ++ "future>=0.14.3", ] if version_info[:2] == (2, 6): REQUIREMENTS.append("argparse") - TEST_REQUIREMENTS = list(REQUIREMENTS) +-TEST_REQUIREMENTS = list(REQUIREMENTS) -TEST_REQUIREMENTS.extend(["mock", "pytest", "coverage", "tox"]) -+TEST_REQUIREMENTS.extend(["mock", "pytest"]) -+ -+class PyTest(TestCommand): -+ user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] -+ -+ def initialize_options(self): -+ TestCommand.initialize_options(self) -+ self.pytest_args = [] -+ -+ def finalize_options(self): -+ TestCommand.finalize_options(self) -+ self.test_args = [] -+ self.test_suite = True -+ -+ def run_tests(self): -+ #import here, cause outside the eggs aren't loaded -+ import pytest -+ errno = pytest.main(self.pytest_args) -+ sys.exit(errno) ++TEST_REQUIREMENTS = [ ++ "mock", ++ "nose" ++] try: long_description = open("README.rst").read() + "\n\n" + open( -@@ -80,4 +100,6 @@ setup(name=NAME, - "Topic :: Communications", - ], - install_requires=REQUIREMENTS, -- tests_require=TEST_REQUIREMENTS) -+ tests_require=TEST_REQUIREMENTS, -+ cmdclass = {'test': PyTest}, -+) |