devel/py-setuptools: Update to 17.0

- Update to 17.0
- Tell setuptools not to install versioned binaries (we'll do it via MAKE_ENV)
- Use uniquefiles to create versioned binaries
- Conditionally create default links (for easy_install) as well
- Remove post-patch bits accordingly, no longer needed.
- Remove upstreamed patch fixing namespace_packages
- Substitute in pkg-message.in correctly
- Update pkg-message.in
- Re-order Makefile entries

Changes:

  https://pythonhosted.org/setuptools/history.html

Differential Revision:	https://reviews.freebsd.org/D2704
Reviewed by:		exp-run
This commit is contained in:
Kubilay Kocak 2015-06-12 11:31:12 +00:00
parent 987822f409
commit 71fdbf10a8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=389266
5 changed files with 26 additions and 69 deletions

View File

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= setuptools
PORTVERSION= 5.5.1
PORTREVISION= 1
PORTVERSION= 17.0
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -13,40 +12,33 @@ COMMENT= Python packages installer
LICENSE= PSFL
# 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]*
PLIST_SUB= PYVER=${PYTHON_VER} VERSION=${PORTVERSION} \
EASYINSTALL_PTH=${PYTHON_SITELIBDIR}/easy-install.pth
USES= python
USE_PYTHON= autoplist distutils
USE_PYTHON= autoplist concurrent distutils
PYDISTUTILS_SETUP= ${PYSETUP}
SUB_LIST= IF_DEFAULT=${IF_DEFAULT}
CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}distribute-[0-9]*
MAKE_ENV+= SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
PLIST_SUB= EASYINSTALL_PTH=${PYTHON_SITELIBDIR}/easy-install.pth
.include <bsd.port.pre.mk>
.if ${PYTHON_VERSION} != ${PYTHON_DEFAULT_VERSION}
SUB_FILES+= pkg-message
SUB_LIST+= PYTHON_VER=${PYTHON_VER}
.endif
post-patch:
.if ${PYTHON_VERSION} != ${PYTHON_DEFAULT_VERSION}
@${REINPLACE_CMD} 's,.*yield "easy_install =.*,,' ${WRKSRC}/setup.py
.endif
@${REINPLACE_CMD} 's,#!python,#!${PYTHON_CMD},' \
${WRKSRC}/setuptools/command/easy_install.py
@${REINPLACE_CMD} 's,#!/usr/bin/python,#!${PYTHON_CMD},' \
${WRKSRC}/setuptools/tests/test_resources.py
# These create dependency loops in redports/poudriere, because setuptools
# is currently an explicit BUILD & RUN dependency in Uses/python.mk.
#TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest
#.if ${PYTHON_REL} < 3300
#TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock
#.endif
post-install:
${INSTALL_DATA} ${FILESDIR}/easy-install.pth.dist ${STAGEDIR}${PYTHON_SITELIBDIR}/
#regression-test: build
# @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
SHA256 (python/setuptools-5.5.1.tar.gz) = 0a930d7b76d3791f7d1e7cf62e9ca74d3a89b653a86577b0a73969a6ad9e427c
SIZE (python/setuptools-5.5.1.tar.gz) = 1017931
SHA256 (python/setuptools-17.0.tar.gz) = 561b33819ef3da2bff89cc8b05fd9b5ea3caeb31ad588b53fdf06f886ac3d200
SIZE (python/setuptools-17.0.tar.gz) = 629845

View File

@ -1,11 +1,11 @@
# install_egg_info command includes directory entries in --record output
# Issue: https://bitbucket.org/pypa/setuptools/issue/118
# TODO: Merge upstream
# TODO: Merge upstream (was merged, then backed out)
--- setuptools/command/install_egg_info.py.orig 2013-11-27 22:45:15.000000000 +0100
+++ setuptools/command/install_egg_info.py 2013-11-27 22:45:23.000000000 +0100
@@ -23,7 +23,7 @@
).egg_name()+'.egg-info'
--- setuptools/command/install_egg_info.py.orig 2015-05-31 02:01:18 UTC
+++ setuptools/command/install_egg_info.py
@@ -27,7 +27,7 @@ class install_egg_info(Command):
).egg_name() + '.egg-info'
self.source = ei_cmd.egg_info
self.target = os.path.join(self.install_dir, basename)
- self.outputs = [self.target]

View File

@ -1,35 +0,0 @@
--- 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

View File

@ -1,7 +1,7 @@
*********************************************************************
The script %%PREFIX%%/bin/easy_install was already installed
on your system, so only the script %%PREFIX%%/bin/easy_install-%%PYVER%%
has been added.
*******************************************************************
*********************************************************************
Only %%PREFIX%%/bin/easy_install-%%PYTHON_VER%% script has been installed
since Python %%PYTHON_VER%% is not the default Python version.
*******************************************************************