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
bsddb3 Move all db4 packages to the default db5 2014-02-15 12:03:02 +01:00
buildout-nix
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
h5py h5py: Change description 2014-09-04 18:48:08 +02:00
irclib
libsexy
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
pycairo fix a bunch of packages with lua5_1 2014-09-10 17:24:56 +02:00
pycangjie
pycrypto pypyPackages.pycrypto: make it work 2014-08-23 19:18:27 +02:00
pycups
pyexiv2
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
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
rbtools rbtools: 0.4.1 -> 0.6.1 2014-09-10 15:41:07 +02:00
recursive-pth-loader
rhpl
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
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
boto-1.9-python-2.7.patch
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
tarsnapper-path.patch
virtualenv-change-prefix.patch #492 python-virtualenv: make modules of the python wrapper available 2014-04-18 18:08:49 +02:00