pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python Add new BOOTSTRAP_SETUPTOOLS variable.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c924dee8a518
branches:  trunk
changeset: 358272:c924dee8a518
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Feb 08 12:09:30 2017 +0000

description:
Add new BOOTSTRAP_SETUPTOOLS variable.

setuptools is one of the basic methods to install python packages.
However, since 34.0 it does not provide its dependencies any longer;
so they need to be installed from pkgsrc.

For bootstrapping, python itself comes with a copy of (pip and) setuptools.
Use this copy to install the necessary packages. They need to be
marked by BOOTSTRAP_SETUPTOOLS=yes for this.

diffstat:

 lang/python/egg.mk |  16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r 35f5384acbb5 -r c924dee8a518 lang/python/egg.mk
--- a/lang/python/egg.mk        Wed Feb 08 11:54:57 2017 +0000
+++ b/lang/python/egg.mk        Wed Feb 08 12:09:30 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: egg.mk,v 1.26 2017/02/04 21:39:05 wiz Exp $
+# $NetBSD: egg.mk,v 1.27 2017/02/08 12:09:30 wiz Exp $
 #
 # Common logic to handle Python Eggs
 #
@@ -37,7 +37,21 @@
 
 _PYSETUPTOOLSINSTALLARGS=      --single-version-externally-managed
 
+# py-setuptools depends on a couple py-* packages that need to be installed
+# beforehand. Of course, those can not be built and installed using py-setuptools
+# itself; so use the setuptools version included with python itself for installing
+# them.
+BOOTSTRAP_SETUPTOOLS?= no
+.if ${BOOTSTRAP_SETUPTOOLS} == "yes"
+BUILD_DEPENDS+=                ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
+do-build: ensurepip
+.PHONY: ensurepip
+
+ensurepip:
+       ${SETENV} ${MAKE_ENV} ${PYTHONBIN} -m ensurepip --user
+.else
 DEPENDS+=      ${PYPKGPREFIX}-setuptools>=0.8:../../devel/py-setuptools
+.endif
 
 INSTALLATION_DIRS+=    ${PYSITELIB}
 



Home | Main Index | Thread Index | Old Index