diff options
author | Asko Soukka <asko.soukka@iki.fi> | 2015-07-22 11:37:14 +0300 |
---|---|---|
committer | Asko Soukka <asko.soukka@iki.fi> | 2015-07-22 20:28:15 +0300 |
commit | fc23e58260dc791762c75fa8abc92296b359a976 (patch) | |
tree | 6a8c27069c747a6a8bab146e2ace2de92175e3d3 /pkgs | |
parent | 90de4aecf252976f4ab17c5de4f50f2e8d0e7340 (diff) | |
download | nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.tar nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.tar.gz nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.tar.bz2 nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.tar.lz nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.tar.xz nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.tar.zst nixpkgs-fc23e58260dc791762c75fa8abc92296b359a976.zip |
zc_buildout_nix: 2.2.1 -> 2.4.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/buildout-nix/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/python-modules/buildout-nix/nix.patch | 49 |
2 files changed, 16 insertions, 39 deletions
diff --git a/pkgs/development/python-modules/buildout-nix/default.nix b/pkgs/development/python-modules/buildout-nix/default.nix index 43e8a45c0cf..e96429e4033 100644 --- a/pkgs/development/python-modules/buildout-nix/default.nix +++ b/pkgs/development/python-modules/buildout-nix/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, buildPythonPackage }: buildPythonPackage { - name = "zc.buildout-nix-2.2.1"; + name = "zc.buildout-nix-2.4.0"; src = fetchurl { - url = "https://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-2.2.1.tar.gz"; - md5 = "476a06eed08506925c700109119b6e41"; + url = "https://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-2.4.0.tar.gz"; + md5 = "b8323b1ad285544de0c3dc14ee76ddd3"; }; patches = [ ./nix.patch ]; diff --git a/pkgs/development/python-modules/buildout-nix/nix.patch b/pkgs/development/python-modules/buildout-nix/nix.patch index dd3b8e12aa8..f358544d36a 100644 --- a/pkgs/development/python-modules/buildout-nix/nix.patch +++ b/pkgs/development/python-modules/buildout-nix/nix.patch @@ -1,38 +1,15 @@ --- a/src/zc/buildout/easy_install.py 2013-08-27 22:28:40.233718116 +0200 +++ b/src/zc/buildout/easy_install.py 2013-10-07 00:29:31.077413935 +0200 -@@ -508,16 +508,31 @@ - self._dest, os.path.basename(dist.location)) - - if os.path.isdir(dist.location): -- # we got a directory. It must have been -- # obtained locally. Just copy it. -- shutil.copytree(dist.location, newloc) -+ # Replace links to garbage collected eggs in -+ # /nix/store -+ if os.path.islink(newloc): -+ # It seems necessary to jump through these -+ # hoops, otherwise we end up in an -+ # infinite loop because -+ # self._env.best_match fails to find the dist -+ os.remove(newloc) -+ dist = self._fetch(avail, tmp, self._download_cache) -+ os.symlink(dist.location, newloc) -+ newdist = pkg_resources.Distribution.from_filename( -+ newloc) -+ self._env.add(newdist) -+ logger.info("Updated link to %s" %dist.location) -+ # Symlink to the egg in /nix/store -+ elif not os.path.exists(newloc): -+ os.symlink(dist.location, newloc) -+ logger.info("Created link to %s" %dist.location) - else: - - - setuptools.archive_util.unpack_archive( - dist.location, newloc) - -- redo_pyc(newloc) -+ redo_pyc(newloc) - - # Getting the dist from the environment causes the - # distribution meta data to be read. Cloning isn't +@@ -227,6 +227,12 @@ + + def _satisfied(self, req, source=None): + dists = [dist for dist in self._env[req.project_name] if dist in req] ++ try: ++ dists = ([dist for dist in dists ++ if dist.precedence == pkg_resources.DEVELOP_DIST] ++ + [pkg_resources.get_distribution(req.project_name)]) ++ except pkg_resources.DistributionNotFound: ++ pass + if not dists: + logger.debug('We have no distributions for %s that satisfies %r.', + req.project_name, str(req)) |