diff options
author | wg <wg@FreeBSD.org> | 2013-12-16 00:22:17 +0800 |
---|---|---|
committer | wg <wg@FreeBSD.org> | 2013-12-16 00:22:17 +0800 |
commit | 781e42a27d143c9dd7bb035b0e0230c7c1b12e88 (patch) | |
tree | 528f950c491cb30f26166e5e23d4b77ad233a5ee /x11-toolkits/py-wxPython28 | |
parent | 2a2657433c0cd564b2a2da9e60eb35d412a019f2 (diff) | |
download | freebsd-ports-gnome-781e42a27d143c9dd7bb035b0e0230c7c1b12e88.tar.gz freebsd-ports-gnome-781e42a27d143c9dd7bb035b0e0230c7c1b12e88.tar.zst freebsd-ports-gnome-781e42a27d143c9dd7bb035b0e0230c7c1b12e88.zip |
Use setuptools for all Python ports.
Setuptools is the preferred method to manage Python distributions after
many changes to the packaging ecosystem over the past couple of years.
Only ports using USE_PYDISTUTILS= yes are affected by this commit, ports using
USE_PYDISTUTILS= easy_install remains the same however this usage is now
deprecated and should be converted to USE_PYDISTUTILS= yes.
Some Python distributions do not work with setuptools out of the box because
they extend the install command from distutils and not setuptools, and
so they need to be patched accordingly.
pip (which leverages setuptools) works around the issue by using eggs, however
we want to get rid of those as well, as support for "flat" installation is
unavailable or has other issues associated with it.
This work allows us to unify how python packages are built, ensure that Python
distributions are installed consistently, reduces complexity for Python port
maintainers and paves the way for simplifying the Python ports framework in
the future.
With hat on: python
Reviewed by: koobs, antoine
Exp-run: bdrewery
Approved by: bdrewery (portmgr)
Diffstat (limited to 'x11-toolkits/py-wxPython28')
-rw-r--r-- | x11-toolkits/py-wxPython28/Makefile | 5 | ||||
-rw-r--r-- | x11-toolkits/py-wxPython28/files/patch-config.py | 35 | ||||
-rw-r--r-- | x11-toolkits/py-wxPython28/pkg-plist | 1 |
3 files changed, 38 insertions, 3 deletions
diff --git a/x11-toolkits/py-wxPython28/Makefile b/x11-toolkits/py-wxPython28/Makefile index 85ca4d0951a0..abf71d47a3ee 100644 --- a/x11-toolkits/py-wxPython28/Makefile +++ b/x11-toolkits/py-wxPython28/Makefile @@ -27,7 +27,7 @@ PYDISTUTILS_BUILDARGS= \ WX_CONFIG="${WX_CONFIG}" \ WXPORT="${WXPORT}" PYDISTUTILS_CONFIGUREARGS= ${PYDISTUTILS_BUILDARGS} -PYDISTUTILS_NOEGGINFO= yes +PYDISTUTILS_EGGINFODIR= ${PYTHONPREFIX_SITELIBDIR}/${WX_PYTHON_DIR} USE_WX= 2.8 WX_COMPS= contrib WX_PREMK= yes @@ -138,7 +138,8 @@ post-install: ${CHMOD} -R a+rX \ ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/${WX_PYTHON_DIR} # Remove unwanted .egg-info - ${RM} ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wxPython_common-*.egg-info + ${RM} -rf ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wxPython_common-*.egg-info + ${RM} -rf ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/${WX_PYTHON_DIR}/*.egg-info .endif ## # wxversion wxPython available list diff --git a/x11-toolkits/py-wxPython28/files/patch-config.py b/x11-toolkits/py-wxPython28/files/patch-config.py new file mode 100644 index 000000000000..1783fdc2b502 --- /dev/null +++ b/x11-toolkits/py-wxPython28/files/patch-config.py @@ -0,0 +1,35 @@ +--- config.py.orig 2013-12-13 11:26:53.752427019 -0200 ++++ config.py 2013-12-13 11:28:04.575423576 -0200 +@@ -38,7 +38,7 @@ + from distutils.dep_util import newer + from distutils.spawn import spawn + +-import distutils.command.install ++import setuptools.command.install + import distutils.command.install_data + import distutils.command.install_headers + import distutils.command.clean +@@ -480,7 +480,7 @@ + # is used in our package build. If we detect that the current + # distutils does not have it then make sure that it is removed from + # the command-line options, otherwise the build will fail. +-for item in distutils.command.install.install.user_options: ++for item in setuptools.command.install.install.user_options: + if item[0] == 'install-layout=': + break + else: +@@ -491,12 +491,12 @@ + + + +-class wx_install(distutils.command.install.install): ++class wx_install(setuptools.command.install.install): + """ + Turns off install_path_file + """ + def initialize_options(self): +- distutils.command.install.install.initialize_options(self) ++ setuptools.command.install.install.initialize_options(self) + self.install_path_file = 0 + + diff --git a/x11-toolkits/py-wxPython28/pkg-plist b/x11-toolkits/py-wxPython28/pkg-plist index d2d834c6fd57..4cffd6c61a4c 100644 --- a/x11-toolkits/py-wxPython28/pkg-plist +++ b/x11-toolkits/py-wxPython28/pkg-plist @@ -2146,7 +2146,6 @@ %%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wx/xrc.py %%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wx/xrc.pyc %%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wx/xrc.pyo -%%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wxPython-2.8.12.1-py%%PYTHON_VER%%.egg-info %%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wxPython/__init__.py %%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wxPython/__init__.pyc %%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wxPython/__init__.pyo |