diff options
author | goibhniu <cillian.deroiste@gmail.com> | 2015-07-22 23:51:47 +0200 |
---|---|---|
committer | goibhniu <cillian.deroiste@gmail.com> | 2015-07-22 23:51:47 +0200 |
commit | 8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96 (patch) | |
tree | 5e4d86e7bc06388899e6f58bccb32e94d8486dd7 /pkgs/development | |
parent | ac36ed18eb9583df48c244e2301d013c827f78e7 (diff) | |
parent | fc23e58260dc791762c75fa8abc92296b359a976 (diff) | |
download | nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.tar nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.tar.gz nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.tar.bz2 nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.tar.lz nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.tar.xz nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.tar.zst nixpkgs-8fbda967e8cf6c7bed9428bfcce0fb7a1d095f96.zip |
Merge pull request #8950 from datakurre/datakurre-master-buildout
zc_buildout_nix: 2.2.1 -> 2.4.0 | fix to prefer "system" packages
Diffstat (limited to 'pkgs/development')
-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)) |