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
This commit is contained in:
parent
9c9f76517e
commit
abcf4f690d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=445859
@ -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
|
||||
|
||||
TESTS_DESC= Install test suite requirements
|
||||
TESTS_BUILD_DEPENDS= ${RUN_DEPENDS} \
|
||||
${TEST_DEPENDS}
|
||||
|
||||
USES= python:2.7
|
||||
USE_PYTHON= autoplist distutils
|
||||
USES= python
|
||||
USE_PYTHON= autoplist concurrent distutils
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
regression-test: build
|
||||
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.if ${PYTHON_REL} < 3000
|
||||
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}configparser>0:devel/py-configparser
|
||||
.endif
|
||||
|
||||
do-test:
|
||||
@cd ${WRKSRC} && ${PYTHON_CMD} -m nose -v
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -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
|
||||
|
@ -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},
|
||||
+)
|
||||
|
Loading…
Reference in New Issue
Block a user