Date: Sat, 22 Sep 2012 14:04:11 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r304675 - in head/ftp/py-pyftpdlib: . files Message-ID: <201209221404.q8ME4BMa079772@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lwhsu Date: Sat Sep 22 14:04:11 2012 New Revision: 304675 URL: http://svn.freebsd.org/changeset/ports/304675 Log: - Tweak USE_PYTHON to -2.7 to match upstream compatibility - Switch from distutils to easy_install (update pkg_plist to suit) - Add OptionsNG for SENDFILE and OPENSSL support - Add test: target to run unit tests - Patch: setup.py - Add zip_safe=False to install egg uncompressed - Add test_suite for running unit tests via setup.py - Patch: test/test_* - add path hacks to test WRKSRC sources PR: ports/171682 Submitted by: Kubilay Kocak <koobs.freebsd@gmail.com> Added: head/ftp/py-pyftpdlib/files/patch-test__test_contrib.py (contents, props changed) head/ftp/py-pyftpdlib/files/patch-test__test_ftpd.py (contents, props changed) Modified: head/ftp/py-pyftpdlib/Makefile head/ftp/py-pyftpdlib/files/patch-setup.py head/ftp/py-pyftpdlib/pkg-plist Modified: head/ftp/py-pyftpdlib/Makefile ============================================================================== --- head/ftp/py-pyftpdlib/Makefile Sat Sep 22 13:53:22 2012 (r304674) +++ head/ftp/py-pyftpdlib/Makefile Sat Sep 22 14:04:11 2012 (r304675) @@ -7,6 +7,7 @@ PORTNAME= pyftpdlib PORTVERSION= 0.7.0 +PORTREVISION= 1 CATEGORIES= ftp python MASTER_SITES= GOOGLE_CODE PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,8 +17,26 @@ COMMENT= Python FTP server library LICENSE= MIT -USE_PYTHON= yes -USE_PYDISTUTILS= yes +USE_PYTHON= -2.7 +USE_PYDISTUTILS= easy_install + +OPTIONS_DEFINE= SENDFILE OPENSSL +OPTIONS_DEFAULT= SENDFILE OPENSSL +SENDFILE_DESC= Enable sendfile(2) support +OPENSSL_DESC= Enable FTP over SSL/TLS (RFC4217) + +# Workaround ports infrastructure bug +OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MSENDFILE} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pysendfile>0:${PORTSDIR}/net/py-pysendfile +.endif + +.if ${PORT_OPTIONS:MOPENSSL} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}openssl>0:${PORTSDIR}/security/py-openssl +.endif EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME} @@ -27,4 +46,8 @@ post-install: ${CP} -R ${WRKSRC}/demo/ ${EXAMPLESDIR} .endif +test: build + ${TOUCH} ${WRKSRC}/test/__init__.py + cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test + .include <bsd.port.mk> Modified: head/ftp/py-pyftpdlib/files/patch-setup.py ============================================================================== --- head/ftp/py-pyftpdlib/files/patch-setup.py Sat Sep 22 13:53:22 2012 (r304674) +++ head/ftp/py-pyftpdlib/files/patch-setup.py Sat Sep 22 14:04:11 2012 (r304675) @@ -1,14 +1,11 @@ ---- ./setup.py.orig 2012-06-15 22:18:19.000000000 +1000 -+++ ./setup.py 2012-06-15 22:18:34.000000000 +1000 -@@ -38,10 +38,7 @@ +--- ./setup.py.orig 2012-01-26 06:31:16.000000000 +1100 ++++ ./setup.py 2012-09-15 01:20:41.000000000 +1000 +@@ -83,6 +83,8 @@ + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + ], ++ test_suite='test', ++ zip_safe=False, + ) - import os - import sys --try: -- from setuptools import setup --except ImportError: -- from distutils.core import setup -+from distutils.core import setup - - name = 'pyftpdlib' - version = '0.7.0' + if os.name == 'posix': Added: head/ftp/py-pyftpdlib/files/patch-test__test_contrib.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ftp/py-pyftpdlib/files/patch-test__test_contrib.py Sat Sep 22 14:04:11 2012 (r304675) @@ -0,0 +1,26 @@ +--- ./test/test_contrib.py.orig 2012-01-26 05:16:27.000000000 +1100 ++++ ./test/test_contrib.py 2012-09-15 01:25:10.000000000 +1000 +@@ -37,6 +37,7 @@ + import ftplib + import unittest + import os ++import sys + import random + import string + import warnings +@@ -56,10 +57,15 @@ + except ImportError: + pass + ++#Path hacks ++sys.path.insert(0, os.path.abspath('..')) + from pyftpdlib import ftpserver + from pyftpdlib.contrib import authorizers + from pyftpdlib.contrib import handlers + from pyftpdlib.contrib import filesystems ++ ++#More hacks ++sys.path.append('.') + from test_ftpd import * + + Added: head/ftp/py-pyftpdlib/files/patch-test__test_ftpd.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ftp/py-pyftpdlib/files/patch-test__test_ftpd.py Sat Sep 22 14:04:11 2012 (r304675) @@ -0,0 +1,11 @@ +--- ./test/test_ftpd.py.orig 2012-01-26 05:16:27.000000000 +1100 ++++ ./test/test_ftpd.py 2012-09-15 01:25:53.000000000 +1000 +@@ -77,6 +77,8 @@ + except ImportError: + sendfile = None + ++#Path hacks ++sys.path.insert(0, os.path.abspath('..')) + from pyftpdlib import ftpserver + + Modified: head/ftp/py-pyftpdlib/pkg-plist ============================================================================== --- head/ftp/py-pyftpdlib/pkg-plist Sat Sep 22 13:53:22 2012 (r304674) +++ head/ftp/py-pyftpdlib/pkg-plist Sat Sep 22 14:04:11 2012 (r304675) @@ -1,21 +1,26 @@ -%%PYTHON_SITELIBDIR%%/pyftpdlib/__init__.py -%%PYTHON_SITELIBDIR%%/pyftpdlib/__init__.pyc -%%PYTHON_SITELIBDIR%%/pyftpdlib/__init__.pyo -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/__init__.py -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/__init__.pyc -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/__init__.pyo -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/authorizers.py -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/authorizers.pyc -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/authorizers.pyo -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/filesystems.py -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/filesystems.pyc -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/filesystems.pyo -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/handlers.py -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/handlers.pyc -%%PYTHON_SITELIBDIR%%/pyftpdlib/contrib/handlers.pyo -%%PYTHON_SITELIBDIR%%/pyftpdlib/ftpserver.py -%%PYTHON_SITELIBDIR%%/pyftpdlib/ftpserver.pyc -%%PYTHON_SITELIBDIR%%/pyftpdlib/ftpserver.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/not-zip-safe +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/top_level.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/__init__.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/__init__.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/__init__.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/__init__.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/__init__.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/__init__.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/authorizers.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/authorizers.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/authorizers.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/filesystems.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/filesystems.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/filesystems.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/handlers.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/handlers.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib/handlers.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/ftpserver.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/ftpserver.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/ftpserver.pyo %%PORTEXAMPLES%%%%EXAMPLESDIR%%/anti_flood_ftpd.py %%PORTEXAMPLES%%%%EXAMPLESDIR%%/basic_ftpd.py %%PORTEXAMPLES%%%%EXAMPLESDIR%%/keycert.pem @@ -26,5 +31,7 @@ %%PORTEXAMPLES%%%%EXAMPLESDIR%%/unix_ftpd.py %%PORTEXAMPLES%%%%EXAMPLESDIR%%/winnt_ftpd.py %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% -@dirrm %%PYTHON_SITELIBDIR%%/pyftpdlib/contrib -@dirrm %%PYTHON_SITELIBDIR%%/pyftpdlib +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib/contrib +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/pyftpdlib +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209221404.q8ME4BMa079772>