- Fixes: easy-install.pth contents lost on upgrade clobbering ports using it
PR: ports/118301 Submitted by: Douglas William Thrift <douglas@douglasthrift.net> Approved by: lars.eggert@nokia.com (maintainer, timeout 3 years), gabor (mentor)
This commit is contained in:
parent
62b52e58c2
commit
3c7099b027
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288634
3 changed files with 38 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= setuptools
|
||||
PORTVERSION= 0.6c11
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
@ -31,12 +31,22 @@ PLIST_SUB+= PYTHON_CURRENT=""
|
|||
PLIST_SUB+= PYTHON_OLD="@comment "
|
||||
.endif
|
||||
|
||||
SUB_FILES= pkg-install
|
||||
SUB_LIST= EASYINSTALL_PTH=${EASYINSTALL_PTH}
|
||||
|
||||
EASYINSTALL_PTH= ${PYTHON_SITELIBDIR}/easy-install.pth
|
||||
|
||||
pre-install:
|
||||
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/site.py ${PYTHON_SITELIBDIR}
|
||||
.for opt in -Qold -O
|
||||
${PYTHON_CMD} ${opt} -m compileall -l -x \
|
||||
'^[^s][^i]?[^t]?[^e]?[^.][^p][^y]$$' ${PYTHON_SITELIBDIR}
|
||||
.endfor
|
||||
${CP} ${EASYINSTALL_PTH} ${EASYINSTALL_PTH}.dist
|
||||
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
|
|
24
devel/py-setuptools/files/pkg-install.in
Normal file
24
devel/py-setuptools/files/pkg-install.in
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
EASYINSTALL_PTH=%%EASYINSTALL_PTH%%
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
if [ -f ${EASYINSTALL_PTH} ]; then
|
||||
mv ${EASYINSTALL_PTH} ${EASYINSTALL_PTH}.tmp
|
||||
fi
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ -f ${EASYINSTALL_PTH}.tmp ]; then
|
||||
mv ${EASYINSTALL_PTH}.tmp ${EASYINSTALL_PTH}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
@comment $FreeBSD$
|
||||
bin/easy_install
|
||||
bin/easy_install-%%PYVER%%
|
||||
%%PYTHON_SITELIBDIR%%/easy-install.pth
|
||||
%%PYTHON_SITELIBDIR%%/setuptools.pth
|
||||
@unexec if cmp -s %B/easy-install.pth %B/easy-install.pth.dist; then rm %B/easy-install.pth; fi
|
||||
%%PYTHON_SITELIBDIR%%/easy-install.pth.dist
|
||||
@exec [ ! -f %B/easy-install.pth ]; then cp %B/%f %B/easy-install.pth; fi
|
||||
%%PYTHON_SITELIBDIR%%/site.py
|
||||
%%PYTHON_SITELIBDIR%%/site.pyc
|
||||
%%PYTHON_SITELIBDIR%%/site.pyo
|
||||
|
|
Loading…
Reference in a new issue