1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00
nixpkgs/pkgs/development/interpreters/python-new/2.5/nix-find-sites-2.5.patch
Marc Weber a7e33ec60c updates: istanbul starts without errors. But no window appears.
svn path=/nixpkgs/trunk/; revision=13554
2008-12-02 12:28:45 +00:00

34 lines
1.1 KiB
Diff

--- a/site.py 2008-11-19 14:48:49.000000000 +0100
--- Python-2.5-orig/Lib/site.py 2008-05-10 19:36:24.000000000 +0200
+++ Python-2.5/Lib/site.py 2008-11-17 05:37:02.000000000 +0100
@@ -390,6 +390,20 @@
except ImportError:
pass
+def addnixsitepackages(known_paths):
+ """
+ used to add multiple site packages for /nix/store to sys.path also
+ evaluating the .pth files (http://docs.python.org/library/site.html#module-site)
+ """
+ env_nix_sites = os.environ.get("NIX_PYTHON_SITES", None)
+ if env_nix_sites:
+ for path in env_nix_sites.split(":"):
+
+ NIX_SITE = os.path.join(path, "lib",
+ "python" + sys.version[:3],
+ "site-packages")
+ addsitedir(NIX_SITE, known_paths)
+ return known_paths
def main():
abs__file__()
@@ -400,6 +414,7 @@
paths_in_sys = addsitepackages(paths_in_sys)
if sys.platform == 'os2emx':
setBEGINLIBPATH()
+ paths_in_sys = addnixsitepackages(paths_in_sys)
setquit()
setcopyright()
sethelper()