aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2021-05-26 15:17:56 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2021-06-03 11:36:56 +0000
commit7a4ce8f831c4911061f4f465b4bf1e830267d4dc (patch)
tree83d680e00f0b3a84776bfd4f51114ebc56ef9b39
parentac412b55156cc77c8e96fb631a338a617749bcb7 (diff)
downloadports-7a4ce8f831c4911061f4f465b4bf1e830267d4dc.tar.gz
ports-7a4ce8f831c4911061f4f465b4bf1e830267d4dc.zip
devel/py-setuptools: update to 57.0.0 preserving old version
- Copy devel/py-setuptools to devel/py-setuptools44 (for Python 2.7 support) - Update devel/py-setuptool to 57.0.0 (adding support for Python 3.10) - Update Mk/Uses/python.mk to chose between py-setuptools and py-setuptools44 based on Python version This allows us to have latest setuptools and working Python 3.10 without breaking packages requiring Python 2 support for remaining reports that require it. Exp-run showed 3 ports failing to build with latest setuptools and they were fixed. PR: 256173 Exp-run by: antoine Reviewed by: koobs (python) Approved by: koobs (python) Differential_Revision: https://reviews.freebsd.org/D30473
-rw-r--r--Mk/Uses/python.mk8
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-setuptools/Makefile5
-rw-r--r--devel/py-setuptools/distinfo6
-rw-r--r--devel/py-setuptools44/Makefile49
-rw-r--r--devel/py-setuptools44/distinfo3
-rw-r--r--devel/py-setuptools44/files/easy-install.pth.dist2
-rw-r--r--devel/py-setuptools44/files/pkg-message.in8
-rw-r--r--devel/py-setuptools44/pkg-descr10
9 files changed, 85 insertions, 7 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index fcaf479d8076..5906013fd3cb 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -554,10 +554,16 @@ UNIQUE_FIND_SUFFIX_MAN_FILES+= ${_UNIQUE_FIND_SUFFIX_FILES} | \
_CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
.if defined(_PYTHON_FEATURE_DISTUTILS) && \
- ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools
+ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools &&\
+ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools44
+.if ${PYTHON_VER} == 2.7
+BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR}
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR}
+.else
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
.endif
+.endif
# distutils support
PYSETUP?= setup.py
diff --git a/devel/Makefile b/devel/Makefile
index 4572ee2900fd..3c2101a31ac9 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5131,6 +5131,7 @@
SUBDIR += py-setuptools
SUBDIR += py-setuptools-git
SUBDIR += py-setuptools-pkg
+ SUBDIR += py-setuptools44
SUBDIR += py-setuptools_hg
SUBDIR += py-setuptools_scm
SUBDIR += py-setuptools_scm_git_archive
diff --git a/devel/py-setuptools/Makefile b/devel/py-setuptools/Makefile
index 759dbdc8cd6e..f41e53d59498 100644
--- a/devel/py-setuptools/Makefile
+++ b/devel/py-setuptools/Makefile
@@ -1,6 +1,5 @@
PORTNAME= setuptools
-PORTVERSION= 44.0.0
-PORTREVISION= 1
+PORTVERSION= 57.0.0
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -15,7 +14,7 @@ COMMENT= Python packages installer
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= python:2.7+ zip
+USES= python:3.6+
USE_PYTHON= allflavors autoplist concurrent distutils
MAKE_ENV+= SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
diff --git a/devel/py-setuptools/distinfo b/devel/py-setuptools/distinfo
index 759bcc340fdd..98989e164334 100644
--- a/devel/py-setuptools/distinfo
+++ b/devel/py-setuptools/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1578923982
-SHA256 (python/setuptools-44.0.0.zip) = e5baf7723e5bb8382fc146e33032b241efc63314211a3a120aaa55d62d2bb008
-SIZE (python/setuptools-44.0.0.zip) = 858893
+TIMESTAMP = 1622043161
+SHA256 (python/setuptools-57.0.0.tar.gz) = 401cbf33a7bf817d08014d51560fc003b895c4cdc1a5b521ad2969e928a07535
+SIZE (python/setuptools-57.0.0.tar.gz) = 2144749
diff --git a/devel/py-setuptools44/Makefile b/devel/py-setuptools44/Makefile
new file mode 100644
index 000000000000..173d4c0ea6d7
--- /dev/null
+++ b/devel/py-setuptools44/Makefile
@@ -0,0 +1,49 @@
+PORTNAME= setuptools
+PORTVERSION= 44.0.0
+PORTREVISION= 1
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX= 44
+DIST_SUBDIR= python
+
+# note: before committing to this port, contact portmgr to arrange for an
+# experimental ports run. Untested commits may be backed out at portmgr's
+# discretion.
+MAINTAINER= python@FreeBSD.org
+COMMENT= Python packages installer
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= python:2.7 zip
+USE_PYTHON= allflavors autoplist concurrent distutils
+
+MAKE_ENV+= SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
+NO_ARCH= yes
+PYDISTUTILS_SETUP= ${PYSETUP}
+
+PLIST_FILES= "@sample %%PYTHON_SITELIBDIR%%/easy-install.pth.dist %%PYTHON_SITELIBDIR%%/easy-install.pth"
+
+.include <bsd.port.pre.mk>
+
+.if ${FLAVOR} != ${FLAVORS:[1]}
+SUB_FILES+= pkg-message
+SUB_LIST+= PYTHON_VER=${PYTHON_VER}
+.endif
+
+# 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:devel/py-pytest@${PY_FLAVOR}
+#.if ${PYTHON_REL} < 30300
+#TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
+#.endif
+# pkg install -y py36-pytest py36-mock py36-pytest-fixture-config py36-pytest-virtualenv py36-paver
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/easy-install.pth.dist ${STAGEDIR}${PYTHON_SITELIBDIR}/
+
+do-test:
+ cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-setuptools44/distinfo b/devel/py-setuptools44/distinfo
new file mode 100644
index 000000000000..759bcc340fdd
--- /dev/null
+++ b/devel/py-setuptools44/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1578923982
+SHA256 (python/setuptools-44.0.0.zip) = e5baf7723e5bb8382fc146e33032b241efc63314211a3a120aaa55d62d2bb008
+SIZE (python/setuptools-44.0.0.zip) = 858893
diff --git a/devel/py-setuptools44/files/easy-install.pth.dist b/devel/py-setuptools44/files/easy-install.pth.dist
new file mode 100644
index 000000000000..e7ab88be464d
--- /dev/null
+++ b/devel/py-setuptools44/files/easy-install.pth.dist
@@ -0,0 +1,2 @@
+import sys; sys.__plen = len(sys.path)
+import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
diff --git a/devel/py-setuptools44/files/pkg-message.in b/devel/py-setuptools44/files/pkg-message.in
new file mode 100644
index 000000000000..2c33be99f2e5
--- /dev/null
+++ b/devel/py-setuptools44/files/pkg-message.in
@@ -0,0 +1,8 @@
+[
+{ type: install
+ message: <<EOM
+ Only %%PREFIX%%/bin/easy_install-%%PYTHON_VER%% script has been installed
+ since Python %%PYTHON_VER%% is not the default Python version.
+EOM
+}
+]
diff --git a/devel/py-setuptools44/pkg-descr b/devel/py-setuptools44/pkg-descr
new file mode 100644
index 000000000000..abcbbd10ceab
--- /dev/null
+++ b/devel/py-setuptools44/pkg-descr
@@ -0,0 +1,10 @@
+Setuptools is a fully-featured, actively-maintained, and stable library
+designed to facilitate packaging Python projects, where packaging includes:
+ - Python package and module definitions
+ - Distribution package metadata
+ - Test hooks
+ - Project installation
+ - Platform-specific details
+ - Python 3 support
+
+WWW: https://pypi.org/project/setuptools/