svn commit: r377419 - in head/devel/py-setuptools: . files
Kubilay Kocak
koobs at FreeBSD.org
Mon Jan 19 13:25:05 UTC 2015
Author: koobs
Date: Mon Jan 19 13:25:04 2015
New Revision: 377419
URL: https://svnweb.freebsd.org/changeset/ports/377419
QAT: https://qat.redports.org/buildarchive/r377419/
Log:
devel/py-setuptools: Backport fix for namespace_packages
Backport an upstream commit [1] that fixes namespace_packages
for python 3.2+
While I'm here, update TEST_DEPENDS comment and regression-test
invocation.
[1] https://bitbucket.org/pypa/setuptools/pull-request/72
PR: 191637
Submitted by: Melvyn Sopacua <melvyn magemana nl>
Approved by: python@
Added:
head/devel/py-setuptools/files/patch-setuptools_command_install_lib.py (contents, props changed)
Modified:
head/devel/py-setuptools/Makefile
Modified: head/devel/py-setuptools/Makefile
==============================================================================
--- head/devel/py-setuptools/Makefile Mon Jan 19 13:21:34 2015 (r377418)
+++ head/devel/py-setuptools/Makefile Mon Jan 19 13:25:04 2015 (r377419)
@@ -2,6 +2,7 @@
PORTNAME= setuptools
PORTVERSION= 5.5.1
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,7 +13,7 @@ COMMENT= Python packages installer
LICENSE= PSFL
-# This creates a dependency loop
+# This creates a dependency loop in Redports (tinderbox)
#TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest
CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}distribute-[0-9]*
@@ -22,6 +23,7 @@ PLIST_SUB= PYVER=${PYTHON_VER} VERSION=$
USES= python
USE_PYTHON= autoplist distutils
+
PYDISTUTILS_SETUP= ${PYSETUP}
SUB_LIST= IF_DEFAULT=${IF_DEFAULT}
@@ -45,6 +47,6 @@ post-install:
${INSTALL_DATA} ${FILESDIR}/easy-install.pth.dist ${STAGEDIR}${PYTHON_SITELIBDIR}/
#regression-test: build
-# @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
+# @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>
Added: head/devel/py-setuptools/files/patch-setuptools_command_install_lib.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-setuptools/files/patch-setuptools_command_install_lib.py Mon Jan 19 13:25:04 2015 (r377419)
@@ -0,0 +1,35 @@
+--- setuptools/command/install_lib.py.orig 2014-07-05 18:05:55.000000000 +0200
++++ setuptools/command/install_lib.py 2014-07-20 21:06:16.000000000 +0200
+@@ -1,5 +1,5 @@
+ import distutils.command.install_lib as orig
+-import os
++import os, imp
+
+
+ class install_lib(orig.install_lib):
+@@ -17,12 +17,24 @@
+ nsp = self.distribution.namespace_packages
+ svem = (nsp and self.get_finalized_command('install')
+ .single_version_externally_managed)
++ exclude_names = ['__init__.py', '__init__.pyc', '__init__.pyo']
++ if hasattr(imp, 'get_tag') :
++ exclude_names.extend((
++ os.path.join(
++ '__pycache__',
++ '__init__.' + imp.get_tag() + '.pyc'
++ ),
++ os.path.join(
++ '__pycache__',
++ '__init__.' + imp.get_tag() + '.pyo'
++ ),
++ ))
+ if svem:
+ for pkg in nsp:
+ parts = pkg.split('.')
+ while parts:
+ pkgdir = os.path.join(self.install_dir, *parts)
+- for f in '__init__.py', '__init__.pyc', '__init__.pyo':
++ for f in exclude_names :
+ exclude[os.path.join(pkgdir, f)] = 1
+ parts.pop()
+ return exclude
More information about the svn-ports-head
mailing list