Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jul 2013 14:08:59 +0200
From:      nemysis <nemysis@gmx.ch>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        python@FreeBSD.org
Subject:   ports/180165: [PATCH] devel/py27-distribute: Fix install and deinstall, remove IF_DEFAULT
Message-ID:  <0Mh6lB-1UXGXM2I8f-00MOpN@mail.gmx.com>
Resent-Message-ID: <201307011210.r61CA0rT001412@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         180165
>Category:       ports
>Synopsis:       [PATCH] devel/py27-distribute: Fix install and deinstall, remove IF_DEFAULT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 01 12:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.1-RELEASE-p8 amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.1-RELEASE-p8 FreeBSD 9.1-RELEASE-p8 #0: Tue Jun 18 15:25:28 UTC 2013
>Description:

- Fix install and deinstall
- Remove IF_DEFAULT from Makefile and pkg-plist
- Cleanup Makefile
- Remove files/pkg-message.in
- Trim pkg-plist

Port maintainer (python@FreeBSD.org) is cc'd.

Generated and tested manually, tested with port test and with RedPorts, sent with FreeBSD Port Tools 0.99_8 (mode: change, diff: ports)

@${REINPLACE_CMD} -e '/easy_install = / s|".*"||' ${WRKSRC}/setup.py


diff setup.py setup.py.bak 
57c57
< console_scripts = []
---
> console_scripts = ["easy_install = setuptools.command.easy_install:main"]  

Build log

https://redports.org/buildarchive/20130701111600-5793/

>How-To-Repeat:
>Fix:

--- py27-distribute-0.6.35.patch begins here ---
diff -ruN /usr/ports/devel/py-distribute/Makefile ./Makefile
--- /usr/ports/devel/py-distribute/Makefile	2013-06-16 15:44:18.000000000 +0200
+++ ./Makefile	2013-07-01 13:10:08.000000000 +0200
@@ -20,8 +20,7 @@
 USE_PYDISTUTILS=	yes
 
 SUB_FILES=	pkg-install
-SUB_LIST=	EASYINSTALL_PTH=${EASYINSTALL_PTH} \
-		IF_DEFAULT=${IF_DEFAULT}
+SUB_LIST=	EASYINSTALL_PTH=${EASYINSTALL_PTH}
 
 EASYINSTALL_PTH=	${PYTHON_SITELIBDIR}/easy-install.pth
 SITE_PY=	${PYTHON_SITELIBDIR}/site.py
@@ -42,18 +41,8 @@
 .endfor
 .endfor
 
-.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} && !exists(${LOCALBASE}/bin/easy_install)
-PLIST_SUB+=	IF_DEFAULT=""
-.else
-PLIST_SUB+=	IF_DEFAULT="@comment "
-SUB_FILES+=	pkg-message
 SUB_LIST+=	PYVER=${PYTHON_VER}
 
-# remove the console script easy_install
-post-patch:
-	@${REINPLACE_CMD} -e '/easy_install = / s|".*"||' ${WRKSRC}/setup.py
-.endif
-
 regression-test: build
 	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
 
@@ -68,5 +57,6 @@
 	${LN} -sf ${EASYINSTALL_PTH}.dist ${PYTHON_SITELIBDIR}/distribute.pth
 	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	if [ -f ${PKGMESSAGE} ]; then ${CAT} ${PKGMESSAGE}; fi
+	cd ${PREFIX}/bin ; ${LN} -sf easy_install-${PYTHON_VER} easy_install
 
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/devel/py-distribute/files/patch-setuptools-command-easy_install.py ./files/patch-setuptools-command-easy_install.py
--- /usr/ports/devel/py-distribute/files/patch-setuptools-command-easy_install.py	2013-06-02 19:00:04.000000000 +0200
+++ ./files/patch-setuptools-command-easy_install.py	2013-06-16 17:49:06.000000000 +0200
@@ -1,6 +1,6 @@
---- setuptools/command/easy_install.py	2010-07-15 01:59:21.000000000 +0200
-+++ setuptools/command/easy_install.py.port	2010-09-15 17:49:35.000000000 +0200
-@@ -688,7 +688,7 @@
+--- setuptools/command/easy_install.py.orig	2013-02-16 08:07:37.000000000 +0100
++++ setuptools/command/easy_install.py	2013-06-16 17:44:03.000000000 +0200
+@@ -704,7 +704,7 @@
              return True
          if not dist.has_metadata('zip-safe'):
              return True
diff -ruN /usr/ports/devel/py-distribute/files/pkg-message.in ./files/pkg-message.in
--- /usr/ports/devel/py-distribute/files/pkg-message.in	2013-06-02 19:00:04.000000000 +0200
+++ ./files/pkg-message.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-@comment $FreeBSD: head/devel/py-distribute/files/pkg-message.in 300896 2012-07-14 13:54:48Z beat $
-*********************************************************************
-
-    The script %%PREFIX%%/bin/easy_install was already installed
-    on your system, so the only script %%PREFIX%%/bin/easy_install-%%PYVER%%
-    has been added.
-
-*********************************************************************
diff -ruN /usr/ports/devel/py-distribute/pkg-plist ./pkg-plist
--- /usr/ports/devel/py-distribute/pkg-plist	2013-06-02 19:00:04.000000000 +0200
+++ ./pkg-plist	2013-06-16 16:18:50.000000000 +0200
@@ -1,5 +1,5 @@
 @comment $FreeBSD: head/devel/py-distribute/pkg-plist 313436 2013-03-05 06:20:28Z rm $
-%%IF_DEFAULT%%bin/easy_install
+bin/easy_install
 bin/easy_install-%%PYVER%%
 %%PYTHON_SITELIBDIR%%/distribute-%%VERSION%%-py%%PYVER%%.egg
 %%PYTHON_SITELIBDIR%%/distribute.pth
--- py27-distribute-0.6.35.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0Mh6lB-1UXGXM2I8f-00MOpN>