From owner-svn-ports-head@freebsd.org Tue Jan 26 14:02:36 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A7FEA6E596; Tue, 26 Jan 2016 14:02:36 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B348798; Tue, 26 Jan 2016 14:02:36 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pa0-x235.google.com with SMTP id uo6so100082498pac.1; Tue, 26 Jan 2016 06:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=78cRFCo27nrHGbKYW6D2K6YrAsCgV53KnwIJfEpfh2o=; b=sG9uhINWCkJVP6hvFvW46rM5v5f6bXprqX9zGCVqXa7Ll5N5Kuun1AMvdOw/GnL1Ec Q6LdQqFiOWdVlBvbuEpsiaWey/4idZJ3HC+bHIozIKcWGNjbUE4BaNWKebVv+yfVrsH7 IwchgECRVLSiBHJovDigb2tzzjheqpWP1ugkdSatGpPG8VW1FWouC6khcv8qL97o8miT ugrJULO0kUy/+5/dsCdgdJkJDzKQD5qK1hHhSiGoDa0wSxG2PUpIsts/CHcFxK+0YChA vhW5h0+02RDwf94dK3AwxnTO+D1d4qEXNoBc30t3EXxbYGNsGB7lqs5vKLRIIf4F7I1R MVzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=78cRFCo27nrHGbKYW6D2K6YrAsCgV53KnwIJfEpfh2o=; b=EyBHXMmxubthiLDYiyYSHePT2VIohYYlJd+QzS86SeF08efmhZoMe3TKM+3MfzMNcQ j7dYC7Ja6MxD/Df8bCCGqvu9WJn4MhZcQ+IiqE4e7zYdPCA64kApSyDtRRiPViaq/30+ K4Z796QbejPJVFUJbutIIK+PBtBnXxxL7uUrGnTn4ZPsQ5IEgQ1UxXm7z+DwXXUWG3Il kMPFCEk8sO2hDb/HMHEDFsSNTCkDyawM9qnfpEp7YTshNjF7a0e5k/Mlg4VPINFaFFCA EWXsGtlboa1uuUnf91LRcrmhPjJHU+2jKqraRxd7M5YboOSSxy4t4KsNqkSckhPjEKBg euMw== X-Gm-Message-State: AG10YOTq6F78oWPg9+VHW9/1TMMA762V7uy6ci8PkMJRHvEwKr6xAmoMsPT9BtC2FjMJEQ== X-Received: by 10.66.234.200 with SMTP id ug8mr34322160pac.129.1453816955473; Tue, 26 Jan 2016 06:02:35 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:e955:70fa:3edd:219e? (2001-44b8-31ae-7b01-e955-70fa-3edd-219e.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:e955:70fa:3edd:219e]) by smtp.gmail.com with ESMTPSA id q142sm2144770pfq.82.2016.01.26.06.02.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jan 2016 06:02:34 -0800 (PST) Sender: Kubilay Kocak Subject: Re: svn commit: r407273 - in head/mail/py-pyspf: . files To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org References: <201601261401.u0QE1bRf036462@repo.freebsd.org> From: Kubilay Kocak Message-ID: <56A77C73.2000900@FreeBSD.org> Date: Wed, 27 Jan 2016 01:02:27 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <201601261401.u0QE1bRf036462@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2016 14:02:36 -0000 On 27/01/2016 1:01 AM, Kubilay Kocak wrote: > Author: koobs > Date: Tue Jan 26 14:01:37 2016 > New Revision: 407273 > URL: https://svnweb.freebsd.org/changeset/ports/407273 > > Log: > mail/py-pyspf: Fix dependencies (missing & incorrect) > > Revision 404778 [1] modified py-pyspf to only use dns/py3dns instead > of conditionally using dns/py-dns and py-py3dns depending on whether > Python 2.x or 3.x was being used. > > dns/py-py3dns is a Python 3.x *only* package, but the port does not > currently [2] limit itself to USES=python:3.0+. > > This results in errors for all dependent ports of py-pyspf when > Python 2.x is used, which was reported for > mail/postfix-policyd-spf-python. [3] > > pyspf's README notes the following requirements: > > This package requires PyDNS (or Py3DNS for running with Python 3) and > either the ipaddr or python3.3 and later > > This package requires authres from either pypi or > http://launchpad.net/authentication-results-python to process > and generate RFC 5451 Authentication Results headers. > > The spf module in this version has been tested with python3.2 and does > not require using 2to3. > > Accordingly, this change: > > - Reverts to conditional RUN_DEPENDS on dns/py-dns or py-py3dns > depending on whether Python 2.x or Python 3.x is being used. > - Adds authres to RUN_DEPENDS > - Adds a conditional RUN_DEPENDS on devel/py-ipaddr, depending on > Python version. > > While I'm here: > > - Sort and group USE{S} entries > - Match COMMENT to setup.py:description > - Add test and post-extract targets, TEST_DEPENDS, and patch files > so that tests can be run properly > - Pet several portlint warnings > > [1] https://svnweb.freebsd.org/changeset/ports/404778 > [2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206645 > [3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206643 > > QA: > > * portlint: OK (WARN: Makefile: [47]: possible use of "${CHMOD}") > * porttest: OK (poudriere: 11amd64, python27, python34) > * unittest: OK (Ran 425 tests in 0.155s) > > PR: 206643 > Reported by: danger > Approved by: portmgr (blanket) > MFH: 2016Q1 > Differential Revision: DXXXX Uh ... Differential Revision: D5082 > Added: > head/mail/py-pyspf/files/ > head/mail/py-pyspf/files/patch-test_testspf.py (contents, props changed) > Modified: > head/mail/py-pyspf/Makefile > head/mail/py-pyspf/pkg-descr > > Modified: head/mail/py-pyspf/Makefile > ============================================================================== > --- head/mail/py-pyspf/Makefile Tue Jan 26 12:13:46 2016 (r407272) > +++ head/mail/py-pyspf/Makefile Tue Jan 26 14:01:37 2016 (r407273) > @@ -4,29 +4,50 @@ > PORTNAME= pyspf > PORTVERSION= 2.0.12 > DISTVERSIONSUFFIX= t > -PORTREVISION= 3 > +PORTREVISION= 4 > CATEGORIES= mail python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} > > MAINTAINER= sunpoet@FreeBSD.org > -COMMENT= Python implementation of the RFC 4408 SPF protocol > +COMMENT= SPF (Sender Policy Framework) implemented in Python > > LICENSE= PSFL > > -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}py3dns>=0:${PORTSDIR}/dns/py-py3dns > +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}authres>=0:${PORTSDIR}/mail/py-authres > +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>=0:${PORTSDIR}/devel/py-yaml > > -NO_ARCH= yes > -USE_PYTHON= autoplist concurrent distutils > USES= python shebangfix > +USE_PYTHON= autoplist concurrent distutils > + > +NO_ARCH= yes > + > WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} > > PLIST_FILES= bin/spf.py > - > SHEBANG_FILES= spf.py > > +.include > + > +.if ${PYTHON_REL} <= 3300 > +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}ipaddr>=0:${PORTSDIR}/devel/py-ipaddr > +.endif > + > +.if ${PYTHON_REL} >= 3000 > +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}py3dns>=0:${PORTSDIR}/dns/py-py3dns > +.else > +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dns>=0:${PORTSDIR}/dns/py-dns > +.endif > + > +# Make the tests run as a module > +post-extract: > + @${TOUCH} ${WRKSRC}/test/__init__.py > + > post-install: > ${CHMOD} ${BINMODE} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/spf.py > ${LN} -s ${PYTHONPREFIX_SITELIBDIR}/spf.py ${STAGEDIR}${PREFIX}/bin/ > > -.include > +do-test: > + @cd ${WRKSRC} && ${PYTHON_CMD} -m test.testspf > + > +.include > > Added: head/mail/py-pyspf/files/patch-test_testspf.py > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/mail/py-pyspf/files/patch-test_testspf.py Tue Jan 26 14:01:37 2016 (r407273) > @@ -0,0 +1,37 @@ > +--- test/testspf.py.orig 2015-01-12 22:47:56 UTC > ++++ test/testspf.py > +@@ -221,9 +221,9 @@ def makeSuite(filename): > + > + def suite(): > + suite = unittest.makeSuite(SPFTestCases,'test') > +- suite.addTest(makeSuite('test.yml')) > +- suite.addTest(makeSuite('rfc7208-tests.yml')) > +- suite.addTest(makeSuite('rfc4408-tests.yml')) > ++ suite.addTest(makeSuite('test/test.yml')) > ++ suite.addTest(makeSuite('test/rfc7208-tests.yml')) > ++ suite.addTest(makeSuite('test/rfc4408-tests.yml')) > + import doctest > + suite.addTest(doctest.DocTestSuite(spf)) > + return suite > +@@ -237,9 +237,9 @@ if __name__ == '__main__': > + # a specific test selected by id from YAML files > + if not tc: > + tc = unittest.TestSuite() > +- t0 = loadYAML('rfc7208-tests.yml') > +- t1 = loadYAML('rfc4408-tests.yml') > +- t2 = loadYAML('test.yml') > ++ t0 = loadYAML('test/rfc7208-tests.yml') > ++ t1 = loadYAML('test/rfc4408-tests.yml') > ++ t2 = loadYAML('test/test.yml') > + if i in t0: > + tc.addTest(SPFTestCase(t0[i])) > + if i in t1: > +@@ -248,7 +248,7 @@ if __name__ == '__main__': > + tc.addTest(SPFTestCase(t2[i])) > + if not tc: > + # load zonedata for doctests > +- fp = open('doctest.yml','rb') > ++ fp = open('test/doctest.yml','rb') > + try: > + zonedata = loadZone(next(yaml.safe_load_all(fp))) > + finally: fp.close() > > Modified: head/mail/py-pyspf/pkg-descr > ============================================================================== > --- head/mail/py-pyspf/pkg-descr Tue Jan 26 12:13:46 2016 (r407272) > +++ head/mail/py-pyspf/pkg-descr Tue Jan 26 14:01:37 2016 (r407273) > @@ -3,6 +3,4 @@ was the first SPF implementation to full > release has also added IPv6 support. pyspf is the library behind > several of the open SPF project's SPF record testing tools. > > -Currently part of the pymilter project: http://pymilter.sourceforge.net > - > WWW: https://pypi.python.org/pypi/pyspf >