Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2013 16:22:17 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r336553 - in head: Mk audio/picard audio/py-eyed3 databases/py-bsddb databases/py-gdbm databases/py-sqlite3 deskutils/tel deskutils/x-tile devel/fnorb devel/hgview devel/py-anonfunc dev...
Message-ID:  <201312151622.rBFGMH4g083953@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Sun Dec 15 16:22:17 2013
New Revision: 336553
URL: http://svnweb.freebsd.org/changeset/ports/336553

Log:
  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)

Added:
  head/devel/py-gyp-devel/files/patch-setup.py   (contents, props changed)
  head/net/py-ldaptor/files/
  head/net/py-ldaptor/files/patch-setup.py   (contents, props changed)
  head/www/py-prewikka/files/
  head/www/py-prewikka/files/patch-setup.py   (contents, props changed)
  head/x11-toolkits/py-wxPython26/files/patch-config.py   (contents, props changed)
  head/x11-toolkits/py-wxPython28/files/patch-config.py   (contents, props changed)
Deleted:
  head/devel/py-anonfunc/pkg-plist
  head/devel/scons/pkg-plist
  head/dns/py-dnspython/pkg-plist-py2
  head/dns/py-dnspython/pkg-plist-py3
  head/math/py-numeric/pkg-plist
  head/www/py-utidy/pkg-plist
Modified:
  head/Mk/bsd.python.mk
  head/audio/picard/Makefile
  head/audio/py-eyed3/Makefile
  head/databases/py-bsddb/Makefile
  head/databases/py-gdbm/Makefile
  head/databases/py-sqlite3/Makefile
  head/deskutils/tel/Makefile
  head/deskutils/x-tile/Makefile
  head/devel/fnorb/Makefile
  head/devel/fnorb/pkg-plist
  head/devel/hgview/Makefile
  head/devel/py-anonfunc/Makefile
  head/devel/py-cxx/Makefile
  head/devel/py-libplist/Makefile
  head/devel/py-mx-experimental/Makefile
  head/devel/py-protocols/Makefile
  head/devel/py-setuptools/Makefile
  head/devel/py-yaml/Makefile
  head/devel/scons/Makefile
  head/dns/py-dnspython/Makefile
  head/editors/zim/Makefile
  head/games/balazarbrothers/Makefile
  head/games/balazarbrothers/pkg-plist
  head/games/gnomesudoku/Makefile
  head/graphics/py-soya3d/Makefile
  head/japanese/tegaki-recognize/Makefile
  head/mail/postfix-policyd-spf-python/Makefile
  head/mail/svnmailer/Makefile
  head/math/py-numeric/Makefile
  head/multimedia/freevo/Makefile
  head/multimedia/freevo/pkg-plist
  head/multimedia/gaupol/Makefile
  head/net/py-ldaptor/Makefile
  head/science/veusz/Makefile
  head/security/umit/Makefile
  head/security/zenmap/Makefile
  head/textproc/py-4suite-xml/Makefile
  head/textproc/py-4suite-xml/pkg-plist
  head/textproc/pychm/Makefile
  head/www/py-prewikka/Makefile
  head/www/py-prewikka/pkg-plist
  head/www/py-utidy/Makefile
  head/www/trac-wysiwyg/Makefile
  head/x11-toolkits/py-fltk/Makefile
  head/x11-toolkits/py-tkinter/Makefile
  head/x11-toolkits/py-wxPython26/Makefile
  head/x11-toolkits/py-wxPython28/Makefile
  head/x11-toolkits/py-wxPython28/pkg-plist
  head/x11/hotwire-shell/files/patch-hotwire__ui_renderers_file.py   (contents, props changed)
  head/x11/hotwire-shell/files/patch-setup.py   (contents, props changed)
  head/x11/terminator/Makefile

Modified: head/Mk/bsd.python.mk
==============================================================================
--- head/Mk/bsd.python.mk	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/Mk/bsd.python.mk	Sun Dec 15 16:22:17 2013	(r336553)
@@ -420,9 +420,13 @@ PYTHONPREFIX_INCLUDEDIR=	${PYTHON_INCLUD
 PYTHONPREFIX_LIBDIR=		${PYTHON_LIBDIR:S;${PYTHONBASE};${PREFIX};}
 PYTHONPREFIX_SITELIBDIR=	${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};}
 
+_CURRENTPORT:=	${PKGNAMEPREFIX}${PORTNAME}
+.if defined(USE_PYDISTUTILS) && ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools
+BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}setuptools>0:${PORTSDIR}/devel/py-setuptools
+.endif
+
 # setuptools support
 .if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install"
-BUILD_DEPENDS+=		${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools
 RUN_DEPENDS+=		${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools
 
 PYDISTUTILS_BUILD_TARGET?=		bdist_egg
@@ -487,33 +491,47 @@ post-install: stage-python-compileall
 
 # distutils support
 PYSETUP?=				setup.py
+PYDISTUTILS_SETUP?=	-c "import setuptools; __file__='${PYSETUP}'; execfile(__file__)"
 PYDISTUTILS_CONFIGUREARGS?=
 PYDISTUTILS_BUILDARGS?=
 PYDISTUTILS_INSTALLARGS?=	-c -O1 --prefix=${PREFIX}
-.if !defined(NO_STAGE) && defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} != "easy_install"
+.if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} != "easy_install"
+. if !defined(PYDISTUTILS_INSTALLNOSINGLE)
+PYDISTUTILS_INSTALLARGS+=	--single-version-externally-managed
+. endif
+. if !defined(NO_STAGE)
 PYDISTUTILS_INSTALLARGS+=	--root=${STAGEDIR}
+. endif
 .endif
+_PYTHONPKGLIST=				${WRKDIR}/.PLIST.pymodtmp
+PYDISTUTILS_INSTALLARGS:=	--record ${_PYTHONPKGLIST} \
+		${PYDISTUTILS_INSTALLARGS}
+
 PYDISTUTILS_PKGNAME?=	${PORTNAME}
 PYDISTUTILS_PKGVERSION?=${PORTVERSION}
 PYDISTUTILS_EGGINFO?=	${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info
-PYDISTUTILS_EGGINFODIR?=${PYTHONPREFIX_SITELIBDIR}
+PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
+add-plist-egginfo:
 .if !defined(PYDISTUTILS_NOEGGINFO) && \
 	!defined(PYDISTUTILS_AUTOPLIST) && \
 	(defined(INSTALLS_EGGINFO) ||	\
 		(defined(USE_PYDISTUTILS) && \
 		 ${USE_PYDISTUTILS} != "easy_install")) && \
 	 defined(PYTHON_REL)
-. for egg in ${PYDISTUTILS_EGGINFO}
-PLIST_FILES+=	${PYDISTUTILS_EGGINFODIR:S;${PREFIX}/;;}/${egg}
+. for egginfo in ${PYDISTUTILS_EGGINFO}
+	if [ -d "${PYDISTUTILS_EGGINFODIR}/${egginfo}" ]; then \
+		${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read f; do \
+			${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}/$${f} >> ${TMPPLIST}; \
+		done; \
+		${ECHO_CMD} "@unexec rmdir \"%D/${PYDISTUTILS_EGGINFODIR:S;${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}\" 2>/dev/null || true" >> ${TMPPLIST}; \
+	fi;
 . endfor
+.else
+	@${DO_NADA}
 .endif
 
 .if defined(PYDISTUTILS_AUTOPLIST) && defined(USE_PYDISTUTILS)
-_PYTHONPKGLIST=				${WRKDIR}/.PLIST.pymodtmp
-PYDISTUTILS_INSTALLARGS:=	--record ${_PYTHONPKGLIST} \
-							${PYDISTUTILS_INSTALLARGS}
-
 _RELSITELIBDIR=	${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
 _RELLIBDIR=		${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;}
 
@@ -637,19 +655,21 @@ MAKE_ENV+=	LDSHARED="${LDSHARED}" PYTHON
 
 .if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE)
 do-configure:
-	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS})
+	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS})
 .endif
 
 .if !target(do-build)
 do-build:
-	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS})
+	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS})
 .endif
 
 .if !target(do-install)
 do-install:
-	@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS})
+	@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS})
 .endif
 
+add-plist-post: add-plist-egginfo
+
 .if defined(PYEASYINSTALL_ARCHDEP)
 .if !target(easyinstall-setopt)
 easyinstall-setopt:

Modified: head/audio/picard/Makefile
==============================================================================
--- head/audio/picard/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/audio/picard/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -45,6 +45,7 @@ RUN_DEPENDS+=	metaflac:${PORTSDIR}/audio
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|'picard.plugins',|'picard.plugins', 'picard.plugins.lastfm', 'picard.plugins.lastfmplus', 'picard.plugins.replaygain',|" \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
 		${WRKSRC}/setup.py
 	@${CP} -R ${WRKSRC}/contrib/plugins/ ${WRKSRC}/picard/plugins
 

Modified: head/audio/py-eyed3/Makefile
==============================================================================
--- head/audio/py-eyed3/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/audio/py-eyed3/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -12,7 +12,8 @@ MAINTAINER=	rm@FreeBSD.org
 COMMENT=	Python module for processing ID3 tags
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>0:${PORTSDIR}/devel/py-setuptools
 
 USE_PYTHON=	2.6-2.7
 NO_STAGE=	yes
@@ -21,7 +22,8 @@ USES=		gmake
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	PYTHON="${PYTHON_CMD}"
 MAKE_ENV=	SETUP_ARGS_BUILD="${PYDISTUTILS_BUILDARGS}" \
-		SETUP_ARGS_INSTALL="${PYDISTUTILS_INSTALLARGS}"
+		SETUP_ARGS_INSTALL="${PYDISTUTILS_INSTALLARGS}" \
+		SETUP_COMMAND="${PYDISTUTILS_SETUP:S,",\",g}"
 DOCSDIR=	${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
 
 MAN1=		eyeD3.1
@@ -34,8 +36,8 @@ post-patch:
 	${REINPLACE_CMD} -e 's,PYTHON="",,g' -e 's,/usr/local,${LOCALBASE},g' \
 		-e 's,2\\\.\[23456789\]\\\.,2.[23456789],g' \
 		${WRKSRC}/configure
-	${REINPLACE_CMD} -e 's,\(setup.py build\),\1 $${SETUP_ARGS_BUILD},g' \
-		-e 's,\(setup.py install\),\1 $${SETUP_ARGS_INSTALL} ,g' \
+	${REINPLACE_CMD} -e 's,\(setup.py build\),$${SETUP_COMMAND} build $${SETUP_ARGS_BUILD},g' \
+		-e 's,\(setup.py install\),$${SETUP_COMMAND} install $${SETUP_ARGS_INSTALL} ,g' \
 		-e 's,^docdir:=.*,docdir:=${DOCSDIR},g' \
 		${WRKSRC}/Makefile.in
 .if defined(NOPORTDOCS)

Modified: head/databases/py-bsddb/Makefile
==============================================================================
--- head/databases/py-bsddb/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/databases/py-bsddb/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -25,15 +25,11 @@ DISTINFO_FILE=	${PORTSDIR}/lang/python${
 WRKSRC=		${PYTHON_WRKSRC}/Modules
 
 PYDISTUTILS_INSTALLARGS+=	--install-lib ${PYTHON_LIBDIR}/lib-dynload
-PYDISTUTILS_NOEGGINFO=	yes
-PYDISTUTILS_PKGNAME=	_bsddb
+PYDISTUTILS_AUTOPLIST=	yes
 
 MAKE_ENV=	BSDDB_VERSION=${BDB_LIB_NAME}
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-py${PYTHON_SUFFIX}-_bsddb.c
 
-PLIST_FILES=	%%PYTHON_LIBDIR%%/lib-dynload/_bsddb.so
-
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 .if ${PYTHON_REL} >= 300

Modified: head/databases/py-gdbm/Makefile
==============================================================================
--- head/databases/py-gdbm/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/databases/py-gdbm/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -26,11 +26,8 @@ DISTINFO_FILE=	${PORTSDIR}/lang/python${
 WRKSRC=		${PYTHON_WRKSRC}/Modules
 
 PYDISTUTILS_INSTALLARGS+=	--install-lib ${PYTHON_LIBDIR}/lib-dynload
-PYDISTUTILS_NOEGGINFO=	yes
+PYDISTUTILS_AUTOPLIST=	yes
 
-PLIST_FILES=	%%PYTHON_LIBDIR%%/lib-dynload/gdbm.so
-
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 post-extract:

Modified: head/databases/py-sqlite3/Makefile
==============================================================================
--- head/databases/py-sqlite3/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/databases/py-sqlite3/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -26,11 +26,8 @@ DISTINFO_FILE=	${PORTSDIR}/lang/python${
 WRKSRC=		${PYTHON_WRKSRC}/Modules
 
 PYDISTUTILS_INSTALLARGS+=	--install-lib ${PYTHON_LIBDIR}/lib-dynload
-PYDISTUTILS_NOEGGINFO=	yes
+PYDISTUTILS_AUTOPLIST=	yes
 
-PLIST_FILES=	%%PYTHON_LIBDIR%%/lib-dynload/_sqlite3.so
-
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 post-extract:

Modified: head/deskutils/tel/Makefile
==============================================================================
--- head/deskutils/tel/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/deskutils/tel/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -14,6 +14,11 @@ USE_BZIP2=	yes
 USES=		gettext
 USE_PYTHON=	yes
 USE_PYDISTUTILS=yes
-
 NO_STAGE=	yes
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/appdistutils.py
+
 .include <bsd.port.mk>

Modified: head/deskutils/x-tile/Makefile
==============================================================================
--- head/deskutils/x-tile/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/deskutils/x-tile/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -8,7 +8,7 @@ CATEGORIES=	deskutils devel python
 MASTER_SITES=	http://www.giuspen.com/software/
 
 MAINTAINER=	sawp@sawp.com.br
-COMMENT=	A GNOME applet to tile the opened windows
+COMMENT=	GNOME applet to tile the opened windows
 
 LICENSE=	GPLv2
 
@@ -33,5 +33,8 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
 		${WRKSRC}/x-tile ${WRKSRC}/linux/x-tile.desktop \
 		${WRKSRC}/modules/cons.py
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 
 .include <bsd.port.mk>

Modified: head/devel/fnorb/Makefile
==============================================================================
--- head/devel/fnorb/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/fnorb/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -13,7 +13,12 @@ COMMENT=	A CORBA 2.0 ORB written in Pyth
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
 
 USE_PYTHON=	yes
-USE_PYDISTUTILS=	yes
+USE_PYDISTUTILS=yes
+PYDISTUTILS_INSTALLNOSINGLE=	yes
+PYDISTUTILS_NOEGGINFO=	yes
+PYDISTUTILS_SETUP=	${PYSETUP}
+
+PLIST_SUB=	PYDISTUTILS_EGGINFO=${PYDISTUTILS_EGGINFO}
 
 NO_STAGE=	yes
 .include <bsd.port.mk>

Modified: head/devel/fnorb/pkg-plist
==============================================================================
--- head/devel/fnorb/pkg-plist	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/fnorb/pkg-plist	Sun Dec 15 16:22:17 2013	(r336553)
@@ -271,6 +271,7 @@ bin/fnping
 %%PYTHON_SITELIBDIR%%/Fnorb/script/fnping.py
 %%PYTHON_SITELIBDIR%%/Fnorb/script/fnping.pyc
 %%PYTHON_SITELIBDIR%%/Fnorb/script/fnping.pyo
+%%PYTHON_SITELIBDIR%%/%%PYDISTUTILS_EGGINFO%%
 %%DOCSDIR%%/CHANGES
 %%DOCSDIR%%/LICENSE.HTML
 %%DOCSDIR%%/MANIFEST.in

Modified: head/devel/hgview/Makefile
==============================================================================
--- head/devel/hgview/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/hgview/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -8,7 +8,7 @@ CATEGORIES=	devel
 MASTER_SITES=	LOGILAB
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A fast Mercurial log navigator written in pyqt4
+COMMENT=	Fast Mercurial log navigator written in pyqt4
 
 RUN_DEPENDS=	hg:${PORTSDIR}/devel/mercurial \
 		${PYTHON_SITELIBDIR}/PyQt4/QtGui.so:${PORTSDIR}/x11-toolkits/py-qt4-gui \
@@ -22,7 +22,7 @@ BUILD_DEPENDS=	hg:${PORTSDIR}/devel/merc
 
 USE_PYTHON=	yes
 USE_PYDISTUTILS=yes
-USE_GMAKE=	yes
+USES=		gmake
 PORTDOCS=	*
 
 MAN1=		hgview.1
@@ -38,6 +38,9 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|path/to.*hgview.py|${PYTHON_SITELIBDIR}/hgext/hgview.py|' \
 		${WRKSRC}/README
 	@${REINPLACE_CMD} -e 's|'make'|'${GMAKE}'|' ${WRKSRC}/setup.py
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}

Modified: head/devel/py-anonfunc/Makefile
==============================================================================
--- head/devel/py-anonfunc/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-anonfunc/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -14,6 +14,11 @@ COMMENT=	Python module that provides eas
 
 USE_PYTHON=	yes
 USE_PYDISTUTILS=yes
+PYDISTUTILS_AUTOPLIST=	yes
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 
-NO_STAGE=	yes
 .include <bsd.port.mk>

Modified: head/devel/py-cxx/Makefile
==============================================================================
--- head/devel/py-cxx/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-cxx/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -27,4 +27,9 @@ post-install:
 		${INSTALL_DATA} ${WRKSRC}/Doc/PyCXX.html ${DOCSDIR}
 .endif
 
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
+
 .include <bsd.port.mk>

Added: head/devel/py-gyp-devel/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-gyp-devel/files/patch-setup.py	Sun Dec 15 16:22:17 2013	(r336553)
@@ -0,0 +1,11 @@
+--- setup.py.orig	2013-12-13 12:37:02.344425745 -0200
++++ setup.py	2013-12-13 12:37:14.480426995 -0200
+@@ -20,7 +20,7 @@
+   packages=['gyp', 'gyp.generator'],
+ 
+   scripts = ['gyp'],
+-  cmdclass = {'install': install,
++  cmdclass = {
+               'install_lib': install_lib,
+               'install_scripts': install_scripts},
+ )

Modified: head/devel/py-libplist/Makefile
==============================================================================
--- head/devel/py-libplist/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-libplist/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -8,7 +8,8 @@ MAINTAINER=	avilla@FreeBSD.org
 COMMENT=	Python bindings for libplist
 
 LIB_DEPENDS=	plist:${PORTSDIR}/${MASTER_PORT}
-BUILD_DEPENDS=	cython:${PORTSDIR}/lang/cython \
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>0:${PORTSDIR}/devel/py-setuptools \
+		cython:${PORTSDIR}/lang/cython \
 		swig2.0:${PORTSDIR}/devel/swig20
 
 USE_PYTHON=	yes

Modified: head/devel/py-mx-experimental/Makefile
==============================================================================
--- head/devel/py-mx-experimental/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-mx-experimental/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -16,11 +16,13 @@ BUILD_DEPENDS=	${LOCALBASE}/include/gmp.
 #RUN_DEPENDS=	${PYTHON_SITELIBDIR}/mx/BeeBase/BeeBase.py:${PORTSDIR}/lang/py-mx-base
 
 USE_PYTHON=	yes
-USE_PYDISTUTILS=	yes
+USE_PYDISTUTILS=yes
 PYDISTUTILS_PKGNAME=	egenix-mx-experimental
 
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e "s|LIBGMPH|${PREFIX}/include|" ${WRKSRC}/mxEXPERIMENTAL.py
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/mxSetup.py
 
 .include <bsd.port.mk>

Modified: head/devel/py-protocols/Makefile
==============================================================================
--- head/devel/py-protocols/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-protocols/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -17,4 +17,8 @@ USE_PYDISTUTILS=	yes
 PYDISTUTILS_PKGNAME=	PyProtocols
 
 NO_STAGE=	yes
+
+post-patch:
+	@${RM} -rf ${WRKSRC}/setuptools
+
 .include <bsd.port.mk>

Modified: head/devel/py-setuptools/Makefile
==============================================================================
--- head/devel/py-setuptools/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-setuptools/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -20,7 +20,8 @@ PLIST_SUB=	PYVER=${PYTHON_VER} VERSION=$
 
 PYDISTUTILS_NOEGGINFO=	yes
 USE_PYTHON=	yes
-USE_PYDISTUTILS=yes
+USE_PYDISTUTILS=	yes
+PYDISTUTILS_SETUP=	${PYSETUP}
 PYTHON_PY3K_PLIST_HACK=	yes
 
 SUB_LIST=	IF_DEFAULT=${IF_DEFAULT}

Modified: head/devel/py-yaml/Makefile
==============================================================================
--- head/devel/py-yaml/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/py-yaml/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -38,7 +38,7 @@ post-install:
 .endif
 
 .if ${PORT_OPTIONS:MLIBYAML}
-PYSETUP=	setup.py --with-libyaml
+PYDISTUTILS_SETUP+=	--with-libyaml
 PYDISTUTILS_BUILD_TARGET=	build_ext
 PYDISTUTILS_BUILDARGS+=	--include-dirs=${LOCALBASE}/include \
 			--library-dirs=${LOCALBASE}/lib
@@ -47,7 +47,7 @@ LIB_DEPENDS+=		yaml-0.2:${PORTSDIR}/text
 
 PLIST_SUB+=	LIBYAML=""
 .else
-PYSETUP=	setup.py --without-libyaml
+PYDISTUTILS_SETUP+=	--without-libyaml
 
 PLIST_SUB+=	LIBYAML="@comment "
 .endif

Modified: head/devel/scons/Makefile
==============================================================================
--- head/devel/scons/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/devel/scons/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -13,10 +13,17 @@ RUN_DEPENDS+=	python2:${PORTSDIR}/lang/p
 
 USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
-PYDISTUTILS_EGGINFODIR=	${PREFIX}/lib/scons-${PORTVERSION}
+PYDISTUTILS_AUTOPLIST=	yes
 
 PLIST_SUB+=	SCONS_VER=${PORTVERSION}
 
 USE_PYTHON=	-2.7
 
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install$$,setuptools\.command\.install,' \
+		-e 's,distutils\.command\.install\.,setuptools\.command\.install\.,' \
+		${WRKSRC}/setup.py
+
 .include <bsd.port.mk>

Modified: head/dns/py-dnspython/Makefile
==============================================================================
--- head/dns/py-dnspython/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/dns/py-dnspython/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -13,8 +13,8 @@ COMMENT=	DNS toolkit for Python
 
 USE_PYTHON=		yes
 USE_PYDISTUTILS=	yes
+PYDISTUTILS_AUTOPLIST=	yes
 PYDISTUTILS_PKGNAME=	${PORTNAME}${PORTVERSIONSUFFIX}
-PYDISTUTILS_NOEGGINFO=	yes
 
 OPTIONSFILE=	${PORT_DBDIR}/${PORTNAME}/options
 OPTIONS_DEFINE=	PYCRYPTO
@@ -32,10 +32,8 @@ NO_STAGE=	yes
 
 .if ${PYTHON_MAJOR_VER} < 3
 PORTVERSIONSUFFIX=
-PLIST=		${PKGDIR}/pkg-plist-py2
 .else
 PORTVERSIONSUFFIX=3
-PLIST=		${PKGDIR}/pkg-plist-py3
 EXAMPLESDIR:=	${EXAMPLESDIR}3
 .endif
 

Modified: head/editors/zim/Makefile
==============================================================================
--- head/editors/zim/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/editors/zim/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -64,7 +64,10 @@ RUN_DEPENDS+=	ditaa:${PORTSDIR}/graphics
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|share/man|man|' ${WRKSRC}/setup.py
+	@${REINPLACE_CMD} \
+		-e 's|share/man|man|' \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 	@${REINPLACE_CMD} -e "s|decode('utf-8')|decode('utf-8','replace')|g" ${WRKSRC}/zim/utils.py
 
 post-install:

Modified: head/games/balazarbrothers/Makefile
==============================================================================
--- head/games/balazarbrothers/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/games/balazarbrothers/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -27,8 +27,13 @@ USE_GMAKE=	yes
 
 PYDISTUTILS_PKGNAME=	BalazarBrothers
 PYDISTUTILS_EGGINFODIR=	${PREFIX}/share
+PYDISTUTILS_SETUP=	${PYSETUP}
+PYDISTUTILS_NOEGGINFO=	yes
+PYDISTUTILS_INSTALLNOSINGLE=	yes
 DATADIR=	share/balazar_brothers
 
+PLIST_SUB=	PYDISTUTILS_EGGINFO=${PYDISTUTILS_EGGINFO}
+
 OPTIONS_DEFINE=	OPENAL
 OPTIONS_DEFAULT=	OPENAL
 

Modified: head/games/balazarbrothers/pkg-plist
==============================================================================
--- head/games/balazarbrothers/pkg-plist	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/games/balazarbrothers/pkg-plist	Sun Dec 15 16:22:17 2013	(r336553)
@@ -367,6 +367,7 @@ bin/balazar_brothers
 %%DATADIR%%/worlds/scn-tree5.data
 %%DATADIR%%/worlds/sign_brother_surf.data
 %%DATADIR%%/worlds/sign_u_turn.data
+share/%%PYDISTUTILS_EGGINFO%%
 @dirrm %%DATADIR%%/fonts
 @dirrm %%DATADIR%%/images
 @dirrm %%DATADIR%%/levels

Modified: head/games/gnomesudoku/Makefile
==============================================================================
--- head/games/gnomesudoku/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/games/gnomesudoku/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -14,7 +14,7 @@ COMMENT=	GNOME Sudoku game
 RUN_DEPENDS=	${PYTHON_SITELIBDIR}/Numeric/Numeric.py:${PORTSDIR}/math/py-numeric \
 		${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging
 
-USE_PYTHON=	2.5+
+USE_PYTHON=	yes
 USE_PYDISTUTILS=yes
 USES=		pathfix display
 USE_GNOME=	gnomeprefix pygnome2 pygnomedesktop
@@ -22,4 +22,10 @@ USE_GNOME=	gnomeprefix pygnome2 pygnomed
 PYDISTUTILS_PKGNAME=	gnome-sudoku
 
 NO_STAGE=	yes
+
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/tools/gsudoku_distutils.py
 .include <bsd.port.mk>

Modified: head/graphics/py-soya3d/Makefile
==============================================================================
--- head/graphics/py-soya3d/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/graphics/py-soya3d/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -26,12 +26,14 @@ USE_BZIP2=	yes
 USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
 USE_OPENAL=	al alut
-USE_GL=		glew
+USE_GL=		glew glu
 USE_GMAKE=	yes
 USE_SDL=	sdl
 
 PYDISTUTILS_PKGNAME=	Soya
 
+LDFLAGS+=	-L${LOCALBASE}/lib -lGLU
+
 MANDIR=	${WRKDIR}/${DISTNAME}/manpage/man1
 MAN1=	soya_editor.1
 INSTALL_DIR=	${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}

Modified: head/japanese/tegaki-recognize/Makefile
==============================================================================
--- head/japanese/tegaki-recognize/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/japanese/tegaki-recognize/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -1,11 +1,6 @@
+# Created by: Timothy Beyer <beyert@cs.ucr.edu>
 # $FreeBSD$
 
-# Date created:				15 Aug 2010
-# Whom:					Timothy Beyer <beyert@cs.ucr.edu>
-#
-# $FreeBSD$
-#
-
 PORTNAME=	tegaki
 PORTVERSION=	0.3.1.2
 CATEGORIES=	japanese python
@@ -18,7 +13,7 @@ COMMENT=	Open-Source Chinese and Japanes
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	zinnia.0:${PORTSDIR}/japanese/zinnia
+LIB_DEPENDS=	libzinnia.so:${PORTSDIR}/japanese/zinnia
 RUN_DEPENDS=	${PYTHON_SITELIBDIR}/tegakigtk/recognizer.py:${PORTSDIR}/japanese/py-tegaki-gtk
 
 USE_PYTHON=	-2.7
@@ -37,4 +32,9 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
 .endif
 
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
+
 .include <bsd.port.post.mk>

Modified: head/mail/postfix-policyd-spf-python/Makefile
==============================================================================
--- head/mail/postfix-policyd-spf-python/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/mail/postfix-policyd-spf-python/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -57,7 +57,7 @@ post-patch:
 
 do-install:
 	@# Install data to an unused directory to ensure it doesn't pollute the system
-	@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} \
+	@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} \
 		${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS} \
 		--install-data ${WRKDIR}/tmp-datadump-dir)
 	${INSTALL_MAN} ${WRKSRC}/policyd-spf.1 ${MANPREFIX}/man/man1

Modified: head/mail/svnmailer/Makefile
==============================================================================
--- head/mail/svnmailer/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/mail/svnmailer/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -31,7 +31,10 @@ PYDISTUTILS_INSTALLARGS+=	--no-install-d
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e "1s|^.*|#!${PYTHON_CMD}|" ${WRKSRC}/setup.py
+	@${REINPLACE_CMD} \
+		-e "1s|^.*|#!${PYTHON_CMD}|" \
+		-e 's,distutils\.command import install ,setuptools\.command import install ,' \
+		${WRKSRC}/setup.py
 	@${REINPLACE_CMD} -e "1s|^.*|#!${PYTHON_CMD}|" ${WRKSRC}/src/svn-mailer
 
 .include <bsd.port.mk>

Modified: head/math/py-numeric/Makefile
==============================================================================
--- head/math/py-numeric/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/math/py-numeric/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -17,44 +17,18 @@ COMMENT=	The Numeric Extension to Python
 
 USE_PYTHON=		yes
 USE_PYDISTUTILS=	yes
-PYDISTUTILS_PKGNAME=	Numeric
-PYDISTUTILS_EGGINFODIR=	${PYTHONPREFIX_SITELIBDIR}/Numeric
-
-# PYDISTUTILS_NOEGGINFO is used as a temporary workaround to fix the plist
-PYDISTUTILS_NOEGGINFO=	yes
+PYDISTUTILS_AUTOPLIST=	yes
 
 WRKSRC=		${WRKDIR}/Numeric-${PORTVERSION}
 
 DOCSDIR=	${PREFIX}/share/doc/py-numeric
 EXAMPLESDIR=	${PREFIX}/share/examples/py-numeric
+PORTDOCS=	*
+PORTEXAMPLES=	*
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE=	DOCS EXAMPLES
 
-.if exists(${LOCALBASE}/bin/easy_install-${PYTHON_VER})
-# py-setuptools is installed - adjust pkg-plist to work with
-# implicit usage in setup.py
-EASY=""
-NOTEASY="@comment "
-.else
-# py-setuptools is not installed - adjust pkg-plist
-EASY="@comment "
-NOTEASY=""
-.endif
-
-# Adjusting pkg-plist gets weirder here. Python 2.5+ incorporates
-# install_egg_info functionality into distutils, so if py-numeric
-# is installed into a lesser Python version, make sure all egg-related
-# pkg-plist entries are omitted
-.if ${PYTHON_SUFFIX} < 25
-NOEGGINFO="@comment "
-.else
-NOEGGINFO=""
-.endif
-
-PLIST_SUB+=	EASY=${EASY} NOTEASY=${NOTEASY} \
-		PYDISTUTILS_EGGINFO=${PYDISTUTILS_EGGINFO} \
-		NOEGGINFO=${NOEGGINFO}
+.include <bsd.port.pre.mk>
 
 post-extract:
 	@${CP} ${DISTDIR}/numpy.pdf ${WRKDIR}
@@ -64,18 +38,17 @@ post-extract:
 # the correct one, because if one has setuptools and another
 # doesn't, that could mess with how pkg-plist is constructed.
 #
-	@${REINPLACE_CMD} -e "s|/usr/bin/env python|/usr/bin/env python${PYTHON_VER}|" ${WRKSRC}/setup.py
+	@${REINPLACE_CMD} \
+		-e "s|/usr/bin/env python|/usr/bin/env python${PYTHON_VER}|" \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 
 post-install:
-.if !defined(NOPORTEXAMPLES)
-	@${INSTALL} -d ${EXAMPLESDIR}
-	${INSTALL_DATA} ${WRKSRC}/Demo/*.py ${EXAMPLESDIR}
-	@${INSTALL} -d ${EXAMPLESDIR}/NumTut
-	${INSTALL_DATA} ${WRKSRC}/Demo/NumTut/* ${EXAMPLESDIR}/NumTut
-.endif
-.if !defined(NOPORTDOCS)
-	@${INSTALL} -d ${DOCSDIR}
-	${INSTALL_DATA} ${WRKDIR}/numpy.pdf ${DOCSDIR}
-.endif
+	@${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/Demo/*.py ${STAGEDIR}${EXAMPLESDIR}
+	@${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}/NumTut
+	${INSTALL_DATA} ${WRKSRC}/Demo/NumTut/* ${STAGEDIR}${EXAMPLESDIR}/NumTut
+	@${INSTALL} -d ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKDIR}/numpy.pdf ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.post.mk>

Modified: head/multimedia/freevo/Makefile
==============================================================================
--- head/multimedia/freevo/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/multimedia/freevo/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -22,7 +22,6 @@ RUN_DEPENDS=	mplayer:${PORTSDIR}/multime
 		${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_DEFAU
 		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}

Modified: head/multimedia/freevo/pkg-plist
==============================================================================
--- head/multimedia/freevo/pkg-plist	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/multimedia/freevo/pkg-plist	Sun Dec 15 16:22:17 2013	(r336553)
@@ -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

Modified: head/multimedia/gaupol/Makefile
==============================================================================
--- head/multimedia/gaupol/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/multimedia/gaupol/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -17,9 +17,10 @@ RUN_DEPENDS=	iso-codes>=0:${PORTSDIR}/mi
 		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>

Modified: head/net/py-ldaptor/Makefile
==============================================================================
--- head/net/py-ldaptor/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/net/py-ldaptor/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -21,6 +21,8 @@ USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
 PYDISTUTILS_PKGVERSION=	0.0.0
 PYDISTUTILS_PKGNAME=	ldaptor
+PYDISTUTILS_INSTALL_TARGET=	install_locale install
+PYDISTUTILS_BUILD_TARGET=	build_locale build
 
 NO_STAGE=	yes
 .include <bsd.port.mk>

Added: head/net/py-ldaptor/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/py-ldaptor/files/patch-setup.py	Sun Dec 15 16:22:17 2013	(r336553)
@@ -0,0 +1,10 @@
+--- setup.py.orig	2013-12-13 13:49:46.929425897 -0200
++++ setup.py	2013-12-13 13:49:58.999423613 -0200
+@@ -154,7 +154,6 @@
+                     'build_locale': build_locale,
+                     'clean': clean,
+                     'clean_locale': clean_locale,
+-                    'install': install,
+                     'install_locale': install_locale,
+                     },
+ 

Modified: head/science/veusz/Makefile
==============================================================================
--- head/science/veusz/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/science/veusz/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -22,4 +22,10 @@ USE_PYDISTUTILS=	yes
 INSTALLS_EGGINFO=	yes
 
 NO_STAGE=	yes
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
+
 .include <bsd.port.mk>

Modified: head/security/umit/Makefile
==============================================================================
--- head/security/umit/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/security/umit/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -23,6 +23,9 @@ USE_PYDISTUTILS=	yes
 NO_STAGE=	yes
 
 post-patch:
-	${REINPLACE_CMD} 's/self.build_html_doc()//' ${WRKSRC}/setup.py
+	${REINPLACE_CMD} \
+		-e 's/self.build_html_doc()//' \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 
 .include <bsd.port.mk>

Modified: head/security/zenmap/Makefile
==============================================================================
--- head/security/zenmap/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/security/zenmap/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -43,9 +43,13 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|su-to-zenmap.sh %F|su-to-zenmap.sh ${PORTNAME}|' \
 		${WRKSRC}/install_scripts/unix/zenmap-root.desktop
 	@${REINPLACE_CMD} \
-		-e '/self.create_uninstaller/s|^|#|' ${WRKSRC}/setup.py
+		-e '/self.create_uninstaller/s|^|#|' \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 	@${REINPLACE_CMD} \
-		-e 's|share/man/man1|man/man1|' ${WRKSRC}/../ndiff/setup.py
+		-e 's|share/man/man1|man/man1|' \
+		-e 's,"install": checked_install,,' \
+		${WRKSRC}/../ndiff/setup.py
 .if ! ${PORT_OPTIONS:MNLS}
 	@${REINPLACE_CMD} -i '' '/locale_dir, mo_find, /d' ${WRKSRC}/setup.py
 .endif
@@ -57,6 +61,6 @@ post-build:
 post-install:
 	${INSTALL_MAN} ${WRKSRC}/../docs/zenmap.1 ${MAN1PREFIX}/man/man1
 	@(cd ${WRKSRC}/../ndiff \
-		&& ${PYTHON_CMD} setup.py install --prefix ${PREFIX})
+		&& ${PYTHON_CMD} setup.py install --prefix=${PREFIX})
 
 .include <bsd.port.mk>

Modified: head/textproc/py-4suite-xml/Makefile
==============================================================================
--- head/textproc/py-4suite-xml/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/textproc/py-4suite-xml/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -15,6 +15,8 @@ USE_BZIP2=	yes
 REINPLACE_ARGS=	-i "" -E
 USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
+PYDISTUTILS_SETUP=	${PYSETUP}
+PYDISTUTILS_NOEGGINFO=	yes
 
 CONFLICTS=	py*-4suite-[01]*
 
@@ -31,7 +33,8 @@ LOCALEDIR=	share/locale
 
 PLIST_SUB+=	PACKAGE_DIR=Ft BINDIR=${BINDIR} SYSCONFDIR=${SYSCONFDIR} \
 		LIBDIR=${LIBDIR} LOCALSTATEDIR=${LOCALSTATEDIR} \
-		DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} LOCALEDIR=${LOCALEDIR}
+		DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} LOCALEDIR=${LOCALEDIR} \
+		PYDISTUTILS_EGGINFO=${PYDISTUTILS_EGGINFO}
 
 SUB_FILES=	pkg-message
 SUB_LIST+=	PACKAGE_DIR=Ft BINDIR=${BINDIR} SYSCONFDIR=${SYSCONFDIR} \

Modified: head/textproc/py-4suite-xml/pkg-plist
==============================================================================
--- head/textproc/py-4suite-xml/pkg-plist	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/textproc/py-4suite-xml/pkg-plist	Sun Dec 15 16:22:17 2013	(r336553)
@@ -805,6 +805,7 @@
 %%PYTHON_SITELIBDIR%%/%%PACKAGE_DIR%%/__config__.py
 %%PYTHON_SITELIBDIR%%/%%PACKAGE_DIR%%/__init__.py
 %%PYTHON_SITELIBDIR%%/%%PACKAGE_DIR%%/__init__.pyc
+%%PYTHON_SITELIBDIR%%/%%PYDISTUTILS_EGGINFO%%
 %%DATADIR%%/Data/Stylesheets/commandline.css
 %%DATADIR%%/Data/Stylesheets/commandline_html.xslt
 %%DATADIR%%/Data/Stylesheets/docbook_html-css.xslt

Modified: head/textproc/pychm/Makefile
==============================================================================
--- head/textproc/pychm/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/textproc/pychm/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -14,8 +14,10 @@ LIB_DEPENDS=	chm.0:${PORTSDIR}/misc/chml
 NO_BUILD=	yes
 USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
-PYDISTUTILS_INSTALLARGS=	build_ext -I${LOCALBASE}/include -L${LOCALBASE}/lib \
-				install -c -O1 --prefix=${PREFIX}
 
 NO_STAGE=	yes
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+PYDISTUTILS_INSTALLARGS:=	${PYDISTUTILS_INSTALLARGS} build_ext -I${LOCALBASE}/include -L${LOCALBASE}/lib
+
+.include <bsd.port.post.mk>

Modified: head/www/py-prewikka/Makefile
==============================================================================
--- head/www/py-prewikka/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/www/py-prewikka/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -11,13 +11,12 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Frontend for the Prelude IDS
 
 BUILD_DEPENDS=	cheetah-compile:${PORTSDIR}/devel/py-cheetah
-LIB_DEPENDS=	prelude:${PORTSDIR}/security/libprelude \
-		preludedb:${PORTSDIR}/security/libpreludedb
+LIB_DEPENDS=	libprelude.so:${PORTSDIR}/security/libprelude \
+		libpreludedb.so:${PORTSDIR}/security/libpreludedb
 
 USE_PYTHON=		-2.7
 USE_PYDISTUTILS=	yes
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MNLS}
@@ -36,10 +35,4 @@ post-patch:
 	   ${WRKSRC}/setup.py
 .endif
 
-post-install:
-	@if [ ! -f ${PREFIX}/etc/prewikka/prewikka.conf ]; then \
-	   ${CP} -p ${PREFIX}/etc/prewikka/prewikka.conf-dist \
-	      ${PREFIX}/etc/prewikka/prewikka.conf ; \
-	fi
-
 .include <bsd.port.mk>

Added: head/www/py-prewikka/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-prewikka/files/patch-setup.py	Sun Dec 15 16:22:17 2013	(r336553)
@@ -0,0 +1,15 @@
+--- setup.py.orig	2013-12-13 13:00:13.747424982 -0200
++++ setup.py	2013-12-13 13:01:10.453423405 -0200
+@@ -27,9 +27,9 @@
+ from distutils.dist import Distribution
+ from distutils.core import setup
+ from distutils.command.build import build
+-from distutils.command.build_py import build_py
+-from distutils.command.install import install
+-from distutils.command.install_scripts import install_scripts
++from setuptools.command.build_py import build_py
++from setuptools.command.install import install
++from setuptools.command.install_scripts import install_scripts
+ from distutils.command.install_data import install_data
+ from distutils.core import Command
+ 

Modified: head/www/py-prewikka/pkg-plist
==============================================================================
--- head/www/py-prewikka/pkg-plist	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/www/py-prewikka/pkg-plist	Sun Dec 15 16:22:17 2013	(r336553)
@@ -236,6 +236,7 @@ etc/prewikka/prewikka.conf-dist
 %%DATADIR%%/htdocs/images/table_order_up.gif
 %%DATADIR%%/htdocs/js/functions.js
 %%DATADIR%%/htdocs/js/jquery.js
+@exec mkdir -p %%DATADIR%%/htdocs/generated_images
 @dirrm %%DATADIR%%/htdocs/js
 @dirrm %%DATADIR%%/htdocs/images
 @dirrm %%DATADIR%%/htdocs/generated_images

Modified: head/www/py-utidy/Makefile
==============================================================================
--- head/www/py-utidy/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/www/py-utidy/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -19,7 +19,11 @@ LIB_DEPENDS=	tidy-0.99.0:${PORTSDIR}/www
 USE_ZIP=	yes
 USE_PYTHON=	-2.7
 USE_PYDISTUTILS=	yes
-PYDISTUTILS_PKGNAME=	uTidylib
+PYDISTUTILS_AUTOPLIST=	yes
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's,distutils\.command\.install ,setuptools\.command\.install ,' \
+		${WRKSRC}/setup.py
 
-NO_STAGE=	yes
 .include <bsd.port.mk>

Modified: head/www/trac-wysiwyg/Makefile
==============================================================================
--- head/www/trac-wysiwyg/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/www/trac-wysiwyg/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -19,7 +19,7 @@ USE_BZIP2=	yes
 USE_PYTHON=	-2.7
 USE_PYDISTUTILS=	easy_install
 PYDISTUTILS_PKGNAME=	TracWysiwyg
-PYDISTUTILS_PKGVERSION=	0.12.${PORTVERSION:R}
+PYDISTUTILS_PKGVERSION=	0.12.0.4
 PLIST_FILES=		%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
 
 NO_STAGE=	yes

Modified: head/x11-toolkits/py-fltk/Makefile
==============================================================================
--- head/x11-toolkits/py-fltk/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/x11-toolkits/py-fltk/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -13,9 +13,9 @@ DISTNAME=	pyFltk-${PORTVERSION:S/.b/b/}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Python interface to FLTK window toolkit
 
-LIB_DEPENDS=	fltk.1:${PORTSDIR}/x11-toolkits/fltk
+LIB_DEPENDS=	libfltk.so:${PORTSDIR}/x11-toolkits/fltk
 
-USE_PYTHON=	2.5+
+USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
 USE_XORG=	x11
 
@@ -34,8 +34,7 @@ post-patch:
 post-build:
 	${REINPLACE_CMD} -e "s|\.\./docs|${DOCSDIR}/html|g" ${WRKSRC}/fltk/test/help.py
 
-do-install:
-	@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} install ${PYDISTUTILS_INSTALLARGS})
+post-install:
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}/html
 	${INSTALL_DATA} ${WRKSRC}/fltk/docs/*.html ${DOCSDIR}/html

Modified: head/x11-toolkits/py-tkinter/Makefile
==============================================================================
--- head/x11-toolkits/py-tkinter/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/x11-toolkits/py-tkinter/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -25,12 +25,8 @@ DISTINFO_FILE=	${PORTSDIR}/lang/python${
 WRKSRC=		${PYTHON_WRKSRC}/Modules
 
 PYDISTUTILS_INSTALLARGS+=	--install-lib ${PYTHON_LIBDIR}/lib-dynload
-PYDISTUTILS_NOEGGINFO=	yes
-PYDISTUTILS_PKGNAME=	Tkinter
+PYDISTUTILS_AUTOPLIST=	yes
 
-PLIST_FILES=	%%PYTHON_LIBDIR%%/lib-dynload/_tkinter.so
-
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 post-extract:

Modified: head/x11-toolkits/py-wxPython26/Makefile
==============================================================================
--- head/x11-toolkits/py-wxPython26/Makefile	Sun Dec 15 16:17:46 2013	(r336552)
+++ head/x11-toolkits/py-wxPython26/Makefile	Sun Dec 15 16:22:17 2013	(r336553)
@@ -151,6 +151,7 @@ post-install:
 # fix installation permissions
 	${CHMOD} -R a+rX \
 		${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/${WX_PYTHON_DIR}
+	@${RM} -rf ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/${WX_PYTHON_DIR}/*egg-info
 .endif
 ##
 # wxversion wxPython available list

Added: head/x11-toolkits/py-wxPython26/files/patch-config.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/py-wxPython26/files/patch-config.py	Sun Dec 15 16:22:17 2013	(r336553)
@@ -0,0 +1,26 @@
+--- config.py.orig	2006-07-15 18:20:18.000000000 -0300
++++ config.py	2013-12-13 11:41:13.788425136 -0200
+@@ -27,7 +27,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

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312151622.rBFGMH4g083953>