From owner-svn-ports-all@FreeBSD.ORG Tue Feb 25 11:29:37 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16F1B24B; Tue, 25 Feb 2014 11:29:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC1571D14; Tue, 25 Feb 2014 11:29:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1PBTacU071289; Tue, 25 Feb 2014 11:29:36 GMT (envelope-from koobs@svn.freebsd.org) Received: (from koobs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1PBTaZk071287; Tue, 25 Feb 2014 11:29:36 GMT (envelope-from koobs@svn.freebsd.org) Message-Id: <201402251129.s1PBTaZk071287@svn.freebsd.org> From: Kubilay Kocak Date: Tue, 25 Feb 2014 11:29:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r345962 - in head/security/py-cryptography: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 11:29:37 -0000 Author: koobs Date: Tue Feb 25 11:29:36 2014 New Revision: 345962 URL: http://svnweb.freebsd.org/changeset/ports/345962 QAT: https://qat.redports.org/buildarchive/r345962/ Log: security/py-cryptography: Tests fix, Depend on OpenSSL - Backport python setup.py test integration PR [1] - Add OpenSSL as a dependency (Was py-openssl dependency) - Add TEST_DEPENDS and regression-test: target [1] https://github.com/pyca/cryptography/pull/678 Added: head/security/py-cryptography/files/ head/security/py-cryptography/files/patch-setup.py (contents, props changed) Modified: head/security/py-cryptography/Makefile Modified: head/security/py-cryptography/Makefile ============================================================================== --- head/security/py-cryptography/Makefile Tue Feb 25 11:28:52 2014 (r345961) +++ head/security/py-cryptography/Makefile Tue Feb 25 11:29:36 2014 (r345962) @@ -3,6 +3,7 @@ PORTNAME= cryptography PORTVERSION= 0.2.1 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -14,9 +15,17 @@ LICENSE= APACHE20 BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=0.8:${PORTSDIR}/devel/py-cffi \ ${PYTHON_PKGNAMEPREFIX}six>=1.4.1:${PORTSDIR}/devel/py-six +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest +USE_OPENSSL= yes USE_PYTHON= yes USE_PYDISTUTILS= yes PYDISTUTILS_AUTOPLIST= yes +CFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -L${OPENSSLLIB} + +regression-test: build + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test + .include Added: head/security/py-cryptography/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-cryptography/files/patch-setup.py Tue Feb 25 11:29:36 2014 (r345962) @@ -0,0 +1,56 @@ +--- ./setup.py.orig 2014-02-23 08:35:18.000000000 +1100 ++++ ./setup.py 2014-02-24 19:34:58.741325597 +1100 +@@ -14,7 +14,8 @@ + from distutils.command.build import build + + from setuptools import setup, find_packages +- ++from setuptools.command.test import test as TestCommand ++import sys + + base_dir = os.path.dirname(__file__) + +@@ -31,6 +32,12 @@ + SIX_DEPENDENCY + ] + ++test_requirements = [ ++ "pytest", ++ "pretend", ++ "iso8601" ++] ++ + + class cffi_build(build): + """ +@@ -63,6 +70,16 @@ + + build.finalize_options(self) + ++class PyTest(TestCommand): ++ 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.test_args) ++ sys.exit(errno) + + with open(os.path.join(base_dir, "README.rst")) as f: + long_description = f.read() +@@ -105,11 +122,12 @@ + + install_requires=requirements, + setup_requires=requirements, +- ++ tests_require=test_requirements, + # for cffi + zip_safe=False, + ext_package="cryptography", + cmdclass={ + "build": cffi_build, ++ "test": PyTest, + } + )