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 /multimedia | |
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 'multimedia')
-rw-r--r-- | multimedia/freevo/Makefile | 10 | ||||
-rw-r--r-- | multimedia/freevo/pkg-plist | 1 | ||||
-rw-r--r-- | multimedia/gaupol/Makefile | 11 |
3 files changed, 18 insertions, 4 deletions
diff --git a/multimedia/freevo/Makefile b/multimedia/freevo/Makefile index 94f6ff9dd209..d7f6f3f6b6e6 100644 --- a/multimedia/freevo/Makefile +++ b/multimedia/freevo/Makefile @@ -22,7 +22,6 @@ RUN_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer \ ${PYTHON_SITELIBDIR}/BeautifulSoup.py:${PORTSDIR}/www/py-beautifulsoup32 \ ${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game \ ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \ - ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted \ ${PYTHON_SITELIBDIR}/Numeric/Numeric_headers/__init__.py:${PORTSDIR}/math/py-numeric FREEVO_USER= freevo @@ -40,8 +39,14 @@ SUB_LIST+= PYTHON_VERSION=${PYTHON_DEFAULT_VERSION} \ FREEVO_HOME=${FREEVO_HOME} SUB_FILES= pkg-message pkg-install pkg-deinstall +USES= twisted:web USE_PYTHON= yes USE_PYDISTUTILS= yes +PYDISTUTILS_INSTALLNOSINGLE= yes +PYDISTUTILS_NOEGGINFO= yes +PYDISTUTILS_SETUP= ${PYSETUP} + +PLIST_SUB= PYDISTUTILS_EGGINFO=${PYDISTUTILS_EGGINFO} USE_RC_SUBR= ${PORTNAME} RC_SCRIPT= ${PREFIX}/etc/rc.d/${PORTNAME} @@ -73,6 +78,9 @@ post-patch: ${WRKSRC}/src/www/htdocs/guidechannel.rpy.orig ${WRKSRC}/src/www/htdocs/proginfo.rpy.orig \ ${WRKSRC}/src/www/htdocs/vlcwin.rpy.orig +do-configure: + @${DO_NADA} + post-install: @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL ${MKDIR} ${CONFDIR} diff --git a/multimedia/freevo/pkg-plist b/multimedia/freevo/pkg-plist index ad0b5779c57d..37eccf9c105d 100644 --- a/multimedia/freevo/pkg-plist +++ b/multimedia/freevo/pkg-plist @@ -1074,6 +1074,7 @@ etc/freevo/local_conf.py.example %%PYTHON_SITELIBDIR%%/freevo/www/web_types.py %%PYTHON_SITELIBDIR%%/freevo/www/web_types.pyc %%PYTHON_SITELIBDIR%%/freevo/www/web_types.pyo +%%PYTHON_SITELIBDIR%%/%%PYDISTUTILS_EGGINFO%% %%DOCSDIR%%/COPYING %%DOCSDIR%%/CREDITS %%DOCSDIR%%/ChangeLog diff --git a/multimedia/gaupol/Makefile b/multimedia/gaupol/Makefile index 5715ea5a794a..d4b3f91e8961 100644 --- a/multimedia/gaupol/Makefile +++ b/multimedia/gaupol/Makefile @@ -17,9 +17,10 @@ RUN_DEPENDS= iso-codes>=0:${PORTSDIR}/misc/iso-codes \ py*-chardet>=0:${PORTSDIR}/textproc/py-chardet \ py*-enchant>=1.5.1:${PORTSDIR}/textproc/py-enchant -USE_GNOME= pygtk2 desktopfileutils -USE_PYTHON= 2.6+ +USE_GNOME= pygtk2 +USE_PYTHON= yes USE_PYDISTUTILS=yes +USES= desktop-file-utils INSTALLS_ICONS= yes MAN1= ${PORTNAME}.1 @@ -35,6 +36,10 @@ PLIST_SUB+= NLS="@comment " .endif post-patch: - @${REINPLACE_CMD} -e 's|share/man|man|g' ${WRKSRC}/setup.py + @${REINPLACE_CMD} \ + -e 's|share/man|man|g' \ + -e 's,distutils\.command\.install$$,setuptools\.command\.install,g' \ + -e 's,distutils\.command\.install\.,setuptools\.command\.install\.,g' \ + ${WRKSRC}/setup.py .include <bsd.port.mk> |