Bug 187091 - [exp-run] allow coexistence of python ports with different python versions required (py33-foo and py27-bar)
Summary: [exp-run] allow coexistence of python ports with different python versions re...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-26 18:40 UTC by Sunpoet Po-Chuan Hsieh
Modified: 2014-03-15 18:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sunpoet Po-Chuan Hsieh freebsd_committer 2014-02-26 18:40:00 UTC
setuptools (devel/py-setuptools) is used for every python ports since r336553.

Please consider the following case:
- py-foo (USE_PYTHON=3) which depends on py33-setuptools
- py-bar (USE_PYTHON=2) which depends on py27-setuptools

We could have only 1 pyXX-setuptools installed, either py33-setuptools or
py27-setuptools, due to limitation of ORIGIN. As a result, these two ports
can't be installed together.

This PR suggests the addition of devel/py-setuptools{27|31|32|33} for different
python versions. This suggestion received no objection among several python@
committers. It also avoids packaging failure for python ports requires Python
3.x (non-default python version), e.g. [1][2].

[1] http://beefy2.isc.freebsd.org/bulk/83amd64-default/2014-02-26_04h39m00s/logs/py33-dns3-3.0.4.log
[2] http://beefy2.isc.freebsd.org/bulk/83amd64-default/2014-02-26_04h39m00s/logs/py33-kyotocabinet-1.22.log

Fix: 

The patch is available at http://people.FreeBSD.org/~sunpoet/py-setuptools.patch
Comment 1 Sunpoet Po-Chuan Hsieh freebsd_committer 2014-02-26 18:59:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Request exp-run.
Comment 2 Bryan Drewery freebsd_committer 2014-03-03 01:39:12 UTC
Responsible Changed
From-To: portmgr->bdrewery

I'll take it.
Comment 3 dfilter service freebsd_committer 2014-03-06 16:33:25 UTC
Author: sunpoet
Date: Thu Mar  6 16:33:17 2014
New Revision: 347268
URL: http://svnweb.freebsd.org/changeset/ports/347268
QAT: https://qat.redports.org/buildarchive/r347268/

Log:
  - Add slave port of devel/py-setuptools for different python versions (27, 32 and 33)
  - Update Mk/bsd.python.mk to use new devel/py-setuptools{27|32|33}
  
  PR:		ports/187091
  Submitted by:	sunpoet (myself)
  Discussed with:	lwhsu, mva, koobs, crees
  Exp-run by:	bdrewery
  With hat:	python
  MFH:		2014Q1

Added:
  head/devel/py-setuptools27/
  head/devel/py-setuptools27/Makefile   (contents, props changed)
  head/devel/py-setuptools32/
  head/devel/py-setuptools32/Makefile   (contents, props changed)
  head/devel/py-setuptools33/
  head/devel/py-setuptools33/Makefile   (contents, props changed)
Modified:
  head/Mk/bsd.python.mk

Modified: head/Mk/bsd.python.mk
==============================================================================
--- head/Mk/bsd.python.mk	Thu Mar  6 16:32:42 2014	(r347267)
+++ head/Mk/bsd.python.mk	Thu Mar  6 16:33:17 2014	(r347268)
@@ -411,10 +411,10 @@ 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
-RUN_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}setuptools>0:${PORTSDIR}/devel/py-setuptools
+_CURRENTPORT:=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
+.if defined(USE_PYDISTUTILS) && ${_CURRENTPORT:S/${PYTHON_SUFFIX}$//} != ${PYTHON_PKGNAMEPREFIX}setuptools
+BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX}
+RUN_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX}
 .endif
 
 # setuptools support

Added: head/devel/py-setuptools27/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-setuptools27/Makefile	Thu Mar  6 16:33:17 2014	(r347268)
@@ -0,0 +1,10 @@
+# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PKGNAMESUFFIX=	${PYTHON_SUFFIX}
+
+PYTHON_VERSION=	2.7
+
+MASTERDIR=	${.CURDIR}/../py-setuptools
+
+.include "${MASTERDIR}/Makefile"

Added: head/devel/py-setuptools32/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-setuptools32/Makefile	Thu Mar  6 16:33:17 2014	(r347268)
@@ -0,0 +1,10 @@
+# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PKGNAMESUFFIX=	${PYTHON_SUFFIX}
+
+PYTHON_VERSION=	3.2
+
+MASTERDIR=	${.CURDIR}/../py-setuptools
+
+.include "${MASTERDIR}/Makefile"

Added: head/devel/py-setuptools33/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-setuptools33/Makefile	Thu Mar  6 16:33:17 2014	(r347268)
@@ -0,0 +1,10 @@
+# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PKGNAMESUFFIX=	${PYTHON_SUFFIX}
+
+PYTHON_VERSION=	3.3
+
+MASTERDIR=	${.CURDIR}/../py-setuptools
+
+.include "${MASTERDIR}/Makefile"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer 2014-03-06 16:38:05 UTC
Author: sunpoet
Date: Thu Mar  6 16:37:56 2014
New Revision: 347272
URL: http://svnweb.freebsd.org/changeset/ports/347272
QAT: https://qat.redports.org/buildarchive/r347272/

Log:
  - Add slave port of devel/py-setuptools for different python versions (27, 32 and 33)
  - Update Mk/bsd.python.mk to use new devel/py-setuptools{27|32|33}
  
  PR:		ports/187091
  Submitted by:	sunpoet (myself)
  Discussed with:	lwhsu, mva, koobs, crees
  Exp-run by:	bdrewery
  With hat:	python
  MFH:		2014Q1

Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Thu Mar  6 16:35:42 2014	(r347271)
+++ head/devel/Makefile	Thu Mar  6 16:37:56 2014	(r347272)
@@ -3801,6 +3801,9 @@
     SUBDIR += py-serpent
     SUBDIR += py-setproctitle
     SUBDIR += py-setuptools
+    SUBDIR += py-setuptools27
+    SUBDIR += py-setuptools32
+    SUBDIR += py-setuptools33
     SUBDIR += py-setuptools-git
     SUBDIR += py-setuptools_darcs
     SUBDIR += py-setuptools_hg
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Bryan Drewery freebsd_committer 2014-03-15 18:33:17 UTC
State Changed
From-To: open->closed

This was done and committed