Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jul 2015 15:09:35 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r391509 - in branches/2015Q3/net/turses: . files
Message-ID:  <201507071509.t67F9ZTI037274@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Tue Jul  7 15:09:34 2015
New Revision: 391509
URL: https://svnweb.freebsd.org/changeset/ports/391509

Log:
  MFH: r391502
  
  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>
  
  Approved by:	portmgr (feld)

Modified:
  branches/2015Q3/net/turses/Makefile
  branches/2015Q3/net/turses/distinfo
  branches/2015Q3/net/turses/files/patch-setup.py
Directory Properties:
  branches/2015Q3/   (props changed)

Modified: branches/2015Q3/net/turses/Makefile
==============================================================================
--- branches/2015Q3/net/turses/Makefile	Tue Jul  7 15:05:12 2015	(r391508)
+++ branches/2015Q3/net/turses/Makefile	Tue Jul  7 15:09:34 2015	(r391509)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	turses
-PORTVERSION=	0.2.22
+PORTVERSION=	0.3.0
 CATEGORIES=	net python
 MASTER_SITES=	CHEESESHOP
 
@@ -11,22 +11,23 @@ COMMENT=	Python Twitter client for the c
 
 LICENSE=	GPLv3
 
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}oauth2>0:${PORTSDIR}/net/py-oauth2 \
-		${PYTHON_PKGNAMEPREFIX}urwid>0:${PORTSDIR}/devel/py-urwid \
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}urwid>0:${PORTSDIR}/devel/py-urwid \
 		${PYTHON_PKGNAMEPREFIX}tweepy>=2.2:${PORTSDIR}/net/py-tweepy
-
-TEST_DEPENDS:=	${RUN_DEPENDS} \
-		${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose \
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest \
 		${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock
 
-OPTIONS_DEFINE=	TESTS
-TESTS_DESC=	Install tools for unit tests
-TESTS_BUILD_DEPENDS=	${TEST_DEPENDS}
+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:2
-USE_PYTHON=	distutils autoplist
+NO_ARCH=	yes
 
 regression-test: build
-	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
+	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
 
 .include <bsd.port.mk>

Modified: branches/2015Q3/net/turses/distinfo
==============================================================================
--- branches/2015Q3/net/turses/distinfo	Tue Jul  7 15:05:12 2015	(r391508)
+++ branches/2015Q3/net/turses/distinfo	Tue Jul  7 15:09:34 2015	(r391509)
@@ -1,2 +1,2 @@
-SHA256 (turses-0.2.22.tar.gz) = a3fbca4d82089fc9b863b1d7d90864ff64f488c773d514906984114f71db0fb7
-SIZE (turses-0.2.22.tar.gz) = 52047
+SHA256 (turses-0.3.0.tar.gz) = 9b6737655b006a1b03123ea294335170ffa576d3696abcfe6dd2853723d5dcca
+SIZE (turses-0.3.0.tar.gz) = 50395

Modified: branches/2015Q3/net/turses/files/patch-setup.py
==============================================================================
--- branches/2015Q3/net/turses/files/patch-setup.py	Tue Jul  7 15:05:12 2015	(r391508)
+++ branches/2015Q3/net/turses/files/patch-setup.py	Tue Jul  7 15:09:34 2015	(r391509)
@@ -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},
++)



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