aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authornivit <nivit@FreeBSD.org>2008-01-09 18:13:01 +0800
committernivit <nivit@FreeBSD.org>2008-01-09 18:13:01 +0800
commitafdc90699371983652cdada1ce789961e194689d (patch)
tree97c7a573101541f01b38f5be5cc9038da1efad42 /devel
parent0388d834e08a765d6555941b2ddf2834b45cbf06 (diff)
downloadfreebsd-ports-graphics-afdc90699371983652cdada1ce789961e194689d.tar.gz
freebsd-ports-graphics-afdc90699371983652cdada1ce789961e194689d.tar.zst
freebsd-ports-graphics-afdc90699371983652cdada1ce789961e194689d.zip
``virtualenv`` is a tool to create isolated Python environments.
It creates an environment that has its own installation directories, that doesn't share libraries with other virtualenv environments (and optionally doesn't use the globally installed libraries either). Usage: virtualenv YOUR_NEW_PYTHON_ENV WWW: http://pypi.python.org/pypi/virtualenv
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-virtualenv/Makefile37
-rw-r--r--devel/py-virtualenv/distinfo3
-rw-r--r--devel/py-virtualenv/files/patch-virtualenv.py12
-rw-r--r--devel/py-virtualenv/files/virtualenv.bash.in11
-rw-r--r--devel/py-virtualenv/files/virtualenv.in8
-rw-r--r--devel/py-virtualenv/pkg-descr9
-rw-r--r--devel/py-virtualenv/pkg-plist22
8 files changed, 103 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 2b5daea8294..41b1acb99c8 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2027,6 +2027,7 @@
SUBDIR += py-urwid
SUBDIR += py-usb
SUBDIR += py-utils
+ SUBDIR += py-virtualenv
SUBDIR += py-vmaps
SUBDIR += py-wsgiutils
SUBDIR += py-xdg
diff --git a/devel/py-virtualenv/Makefile b/devel/py-virtualenv/Makefile
new file mode 100644
index 00000000000..b0d43222400
--- /dev/null
+++ b/devel/py-virtualenv/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: py-virtualenv
+# Date created: 2007-10-10
+# Whom: Nicola Vitale <nivit@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= virtualenv
+PORTVERSION= 0.9
+#PORTREVISION= 0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP \
+ http://nivi.interfree.it/distfiles/${PORTNAME}/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= nivit@FreeBSD.org
+COMMENT= Virtual Python Environment builder
+
+RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
+
+PYEASYINSTALL_INSTALLARGS= -q -N -S ${PYTHON_SITELIBDIR} -x ${PYDISTUTILS_PKGNAME}==${PYDISTUTILS_PKGVERSION}
+PYEASYINSTALL_UNINSTALLARGS+= -q -m -S ${PYTHON_SITELIBDIR} -x ${PYDISTUTILS_PKGNAME}==${PYDISTUTILS_PKGVERSION}
+
+SUB_FILES= ${PORTNAME} ${PORTNAME}.bash
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD} PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR} PYEASYINSTALL_EGG=${PYEASYINSTALL_EGG}
+
+USE_PYTHON= 2.4+
+USE_PYDISTUTILS= easy_install
+
+pre-build:
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} setopt -c easy_install -o exclude-scripts -s 1
+
+post-install:
+ @${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.bash ${PYTHON_SITELIBDIR}/${PYEASYINSTALL_EGG}/support-files/
+ @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/devel/py-virtualenv/distinfo b/devel/py-virtualenv/distinfo
new file mode 100644
index 00000000000..24be86d4a95
--- /dev/null
+++ b/devel/py-virtualenv/distinfo
@@ -0,0 +1,3 @@
+MD5 (virtualenv-0.9.tar.gz) = 17a52f8801cbeb6805f4a4650dc89468
+SHA256 (virtualenv-0.9.tar.gz) = f2a916c648cf705a68b7fc7a87c7803cb1c162bb0269aa7ca096783d3b26c69b
+SIZE (virtualenv-0.9.tar.gz) = 677526
diff --git a/devel/py-virtualenv/files/patch-virtualenv.py b/devel/py-virtualenv/files/patch-virtualenv.py
new file mode 100644
index 00000000000..288e4b61d25
--- /dev/null
+++ b/devel/py-virtualenv/files/patch-virtualenv.py
@@ -0,0 +1,12 @@
+--- virtualenv.py 2007-10-10 16:27:32.000000000 +0200
++++ virtualenv.py.port 2008-01-06 13:42:54.000000000 +0100
+@@ -464,6 +464,9 @@
+ if sys.executable != py_executable:
+ ## FIXME: could I just hard link?
+ shutil.copyfile(sys.executable, py_executable)
++ if not py_executable.endswith('/python'):
++ py_link = os.path.join(os.path.dirname(py_executable), 'python')
++ os.symlink(os.path.basename(py_executable), py_link)
+ make_exe(py_executable)
+
+ if 'Python.framework' in sys.prefix:
diff --git a/devel/py-virtualenv/files/virtualenv.bash.in b/devel/py-virtualenv/files/virtualenv.bash.in
new file mode 100644
index 00000000000..efedd038c90
--- /dev/null
+++ b/devel/py-virtualenv/files/virtualenv.bash.in
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+# $FreeBSD$
+
+if [ ! -d ${NEWPYTHONENV} ]; then
+ %%PYTHON_CMD%% %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv.py ${NEWPYTHONENV}
+fi
+
+if [ -f ${NEWPYTHONENV}/bin/activate ]; then
+ source ${NEWPYTHONENV}/bin/activate
+fi
+
diff --git a/devel/py-virtualenv/files/virtualenv.in b/devel/py-virtualenv/files/virtualenv.in
new file mode 100644
index 00000000000..aa9c7d93ded
--- /dev/null
+++ b/devel/py-virtualenv/files/virtualenv.in
@@ -0,0 +1,8 @@
+#!/bin/sh
+# $FreeBSD$
+
+if [ "$1" = "" ]; then
+ echo "usage: $0 ENVIRONMENT_NAME"
+else
+ exec env NEWPYTHONENV="$1" %%PREFIX%%/bin/bash --init-file %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/support-files/virtualenv.bash
+fi
diff --git a/devel/py-virtualenv/pkg-descr b/devel/py-virtualenv/pkg-descr
new file mode 100644
index 00000000000..7d96f393b1f
--- /dev/null
+++ b/devel/py-virtualenv/pkg-descr
@@ -0,0 +1,9 @@
+``virtualenv`` is a tool to create isolated Python environments.
+
+It creates an environment that has its own installation directories,
+that doesn't share libraries with other virtualenv environments
+(and optionally doesn't use the globally installed libraries either).
+
+Usage: virtualenv YOUR_NEW_PYTHON_ENV
+
+WWW: http://pypi.python.org/pypi/virtualenv
diff --git a/devel/py-virtualenv/pkg-plist b/devel/py-virtualenv/pkg-plist
new file mode 100644
index 00000000000..8ffa5aaae77
--- /dev/null
+++ b/devel/py-virtualenv/pkg-plist
@@ -0,0 +1,22 @@
+@comment $FreeBSD$
+bin/virtualenv
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/entry_points.txt
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/not-zip-safe
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/top_level.txt
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/rebuild-script.py
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/rebuild-script.pyc
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/rebuild-script.pyo
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/refresh-support-files.py
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/refresh-support-files.pyc
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/refresh-support-files.pyo
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/support-files/setuptools-0.6c7-py2.5.egg
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/support-files/virtualenv.bash
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv.py
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv.pyc
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv.pyo
+@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO
+@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/support-files
+@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%