- Add files/pkg-install.in, (pre|post)-install target,
and some pkg-add's directives in pkg-plist to preserve the easy-install.pth file when the port is upgraded - Bump PORTREVISION - Install a copy of site.py[co]? .
This commit is contained in:
parent
6c20977989
commit
e1ce3cdb6a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=270518
3 changed files with 48 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= distribute
|
||||
PORTVERSION= 0.6.14
|
||||
#PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
@ -23,4 +23,19 @@ PYDISTUTILS_NOEGGINFO= yes
|
|||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS= yes
|
||||
|
||||
SUB_FILES= pkg-install
|
||||
SUB_LIST= EASYINSTALL_PTH=${EASYINSTALL_PTH}
|
||||
|
||||
EASYINSTALL_PTH= ${PYTHON_SITELIBDIR}/easy-install.pth
|
||||
SITE_PY= ${PYTHON_SITELIBDIR}/site.py
|
||||
pre-install:
|
||||
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/site.py ${SITE_PY}
|
||||
${PYTHON_CMD} -m py_compile ${SITE_PY}
|
||||
${PYTHON_CMD} -OO -m py_compile ${SITE_PY}
|
||||
${CP} ${EASYINSTALL_PTH} ${EASYINSTALL_PTH}.dist
|
||||
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
25
devel/py-distribute/files/pkg-install.in
Normal file
25
devel/py-distribute/files/pkg-install.in
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
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,6 +1,12 @@
|
|||
@comment $FreeBSD$
|
||||
bin/easy_install
|
||||
bin/easy_install-%%PYVER%%
|
||||
%%PYTHON_SITELIBDIR%%/distribute-%%VERSION%%-py%%PYVER%%.egg
|
||||
%%PYTHON_SITELIBDIR%%/easy-install.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%%/setuptools-%%SETUPTOOLS_VER%%-py%%PYVER%%.egg-info
|
||||
%%PYTHON_SITELIBDIR%%/setuptools.pth
|
||||
%%PYTHON_SITELIBDIR%%/site.py
|
||||
%%PYTHON_SITELIBDIR%%/site.pyc
|
||||
%%PYTHON_SITELIBDIR%%/site.pyo
|
||||
|
|
Loading…
Reference in a new issue