summaryrefslogtreecommitdiff
path: root/net/turses/files/patch-setup.py
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2015-07-07 11:48:02 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2015-07-07 11:48:02 +0000
commita6d1f0198c85632f66f3094817f7e8a571e13bb3 (patch)
treefb5d19d178db35daf0419596d5283f91c6a27bfe /net/turses/files/patch-setup.py
parent- Update to 2.8 (diff)
net/turses: Update to 0.3.0, Unbreak.
- Update to 0.3.0, unbreaking due to 2.3+ versions of net/py-tweepy in the ports tree - Patch setup.py to relax py-tweepy version requirement - oauth2 is no longer required - Set USES=python to 2.7, since this doesnt need the meta-port - Patch in setuptools test command support (setup.py) - Update TEST_DEPENDS and TESTS option description - Sort USE_PYTHON values - Add NO_ARCH Second half of: PR: 200621 Reported by: Patrick P. <freebsdbug patpro net> MFH: 2015Q3
Diffstat (limited to 'net/turses/files/patch-setup.py')
-rw-r--r--net/turses/files/patch-setup.py55
1 files changed, 45 insertions, 10 deletions
diff --git a/net/turses/files/patch-setup.py b/net/turses/files/patch-setup.py
index 052dfaadb538..5e4ce62d1e37 100644
--- a/net/turses/files/patch-setup.py
+++ b/net/turses/files/patch-setup.py
@@ -1,18 +1,53 @@
---- ./setup.py.orig 2013-12-03 05:34:39.000000000 +1100
-+++ ./setup.py 2014-03-08 14:28:44.204623431 +1100
-@@ -47,7 +47,7 @@
+--- setup.py.orig 2015-07-07 10:35: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"
+
+ REQUIREMENTS = [
+ "urwid",
+- "tweepy==3.1.0",
++ "tweepy>=3.1.0",
+ ]
+ if version_info[:2] == (2, 6):
REQUIREMENTS.append("argparse")
TEST_REQUIREMENTS = list(REQUIREMENTS)
--TEST_REQUIREMENTS.extend(["mock", "nose", "coverage", "tox"])
-+TEST_REQUIREMENTS.extend(["mock", "nose"])
+-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)
try:
- long_description = open("README.rst").read() + "\n\n" + open("HISTORY.rst").read()
-@@ -80,5 +80,6 @@
- "Programming Language :: Python :: 2.7",
+ long_description = open("README.rst").read() + "\n\n" + open(
+@@ -80,4 +100,6 @@ setup(name=NAME,
"Topic :: Communications",
],
-+ test_suite = 'nose.collector',
install_requires=REQUIREMENTS,
- tests_require=TEST_REQUIREMENTS)
+- tests_require=TEST_REQUIREMENTS)
++ tests_require=TEST_REQUIREMENTS,
++ cmdclass = {'test': PyTest},
++)