nixpkgs/pkgs/development/python-modules
Rok Garbas 602f7e5aa4 python: collision in names when developing 2 and more python packages with nix
when you run nix-shell 2 times at the same time of project (but different
branches) you get collision in names inside /tmp folder. i solved this by
hashing current path of developing folder and using that as indentifier while
still keeping name at the end.

diff --git a/pkgs/development/python-modules/generic/default.nix
b/pkgs/development/python-modules/generic/default.nix index 4c9c53a..6ec7934
100644 --- a/pkgs/development/python-modules/generic/default.nix +++
b/pkgs/development/python-modules/generic/default.nix @@ -161,11 +161,12 @@ if
disabled then throw "${name} not supported for interpreter ${python.executabl

   shellHook = attrs.shellHook or ''
     if test -e setup.py; then
-       mkdir -p /tmp/$name/lib/${python.libPrefix}/site-packages
+       tmp_path=/tmp/`pwd | md5sum | cut -f 1 -d " "`-$name
+       mkdir -p $tmp_path/lib/${python.libPrefix}/site-packages
        ${preShellHook}
-       export PATH="/tmp/$name/bin:$PATH"
-       export PYTHONPATH="/tmp/$name/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
-       ${python}/bin/${python.executable} setup.py develop --prefix /tmp/$name
+       export PATH="$tmp_path/bin:$PATH"
+       export PYTHONPATH="$tmp_path/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+       ${python}/bin/${python.executable} setup.py develop --prefix $tmp_path
        ${postShellHook}
     fi
   '';
2014-09-19 14:23:45 +02:00
..
4suite 4suite: mark as broken 2014-06-22 20:52:52 +02:00
blivet Fix a bunch of Hydra evaluation errors 2013-10-07 17:36:47 +02:00
bsddb3 Move all db4 packages to the default db5 2014-02-15 12:03:02 +01:00
buildout-nix zc_buildout_nix: update to 2.2.1 2013-11-21 12:30:04 +01:00
dbus pypy: handle unsupported packages 2014-09-12 00:26:50 +02:00
distutils-cfg pythonPackages: distutils-cfg, allow to override config 2014-03-13 11:33:11 +01:00
ecdsa Fix many package descriptions 2014-08-24 22:31:37 +02:00
generic python: collision in names when developing 2 and more python packages with nix 2014-09-19 14:23:45 +02:00
gyp python-gyp: Fix no-xcode.patch for Darwin. 2013-09-27 15:52:44 +02:00
h5py h5py: Change description 2014-09-04 18:48:08 +02:00
irclib Even more mirror:// fixes 2013-07-14 04:17:07 +03:00
libsexy * Reverted most of the recent Python refactorings, as discussed. It's 2010-04-21 10:51:15 +00:00
mpi4py mpi4py: Disable for Python3 and PyPy 2014-09-07 19:44:08 +02:00
mygpoclient added platform meta information to gpodder 2014-07-22 09:39:06 +02:00
numeric Fix many package descriptions 2014-08-24 22:31:37 +02:00
psyco * Reverted most of the recent Python refactorings, as discussed. It's 2010-04-21 10:51:15 +00:00
pycairo fix a bunch of packages with lua5_1 2014-09-10 17:24:56 +02:00
pycangjie Add pycangjie 2014-02-02 14:54:40 +01:00
pycrypto pypyPackages.pycrypto: make it work 2014-08-23 19:18:27 +02:00
pycups * Update pycups, PyQt and SIP. 2011-07-21 20:14:17 +00:00
pyexiv2 add jbrout, a photo manager using IPTC keywords/EXIF 2011-08-22 20:26:11 +00:00
pygame Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
pygobject pygobject3: update 3.10.2 -> 3.12.1 2014-05-20 13:37:09 +02:00
pygtk pygtk: disable on py3k 2014-08-26 14:41:44 +02:00
pylint pylint: update to version 1.2.1 2014-05-13 16:11:06 +02:00
pyopenssl pyopenssl: update from 0.13 to 0.13.1, potentially fixes CVE-2013-4314 2013-12-04 05:26:34 +02:00
pyqt add pyqt5 2014-07-07 14:23:55 +08:00
pyside freecad: updating to 0.14 2014-08-01 16:56:27 +02:00
pyx Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
pyxml * Reverted most of the recent Python refactorings, as discussed. It's 2010-04-21 10:51:15 +00:00
rbtools rbtools: 0.4.1 -> 0.6.1 2014-09-10 15:41:07 +02:00
recursive-pth-loader recursive-pth-loader: fix python path 2013-09-08 22:07:20 +02:00
rhpl python-rhpl: fix mirror. unfortunately can't use mirror://fedora for this because this is a very old 2013-07-14 02:08:54 +03:00
setuptools setuptools: 2.1 -> 5.8 2014-09-18 14:03:16 +02:00
sip disable a bunch of python packages on pypy 2014-09-06 22:25:00 +02:00
slowaes Fix tarball 2014-03-24 00:16:42 -04:00
stringtemplate * Reverted most of the recent Python refactorings, as discussed. It's 2010-04-21 10:51:15 +00:00
tables tables: Define license 2014-07-05 21:41:04 +02:00
wxPython pypy: handle unsupported packages 2014-09-12 00:26:50 +02:00
xmpppy Even more mirror:// fixes 2013-07-14 04:17:07 +03:00
boto-1.9-python-2.7.patch * Applied a patch to get Euca2ools / Boto to work on Python 2.7. 2011-10-21 15:01:40 +00:00
btrees_interger_overflow.patch python3Packages.BTrees: fix build on i686-linux 2014-08-26 10:47:22 +02:00
fedpkg-buildfix.diff Add fedpkg, koji &c. + their python dependencies. 2014-02-08 14:37:53 +01:00
pyuv-external-libuv.patch python-pyuv: new package 2014-08-22 21:57:14 +02:00
rpkg-buildfix.diff Add fedpkg, koji &c. + their python dependencies. 2014-02-08 14:37:53 +01:00
sqlalchemy-0.7.10-test-failures.patch sqlalchemy: add the patch so that things work, you know 2013-07-28 17:13:19 +02:00
tarsnapper-path.patch pythonPackages.tarsnapper: New expression 2014-01-25 10:30:35 +00:00
virtualenv-change-prefix.patch #492 python-virtualenv: make modules of the python wrapper available 2014-04-18 18:08:49 +02:00