mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
zc_buildout_nix: 2.2.1 -> 2.4.0
This commit is contained in:
parent
90de4aecf2
commit
fc23e58260
@ -1,11 +1,11 @@
|
|||||||
{ fetchurl, stdenv, buildPythonPackage }:
|
{ fetchurl, stdenv, buildPythonPackage }:
|
||||||
|
|
||||||
buildPythonPackage {
|
buildPythonPackage {
|
||||||
name = "zc.buildout-nix-2.2.1";
|
name = "zc.buildout-nix-2.4.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-2.2.1.tar.gz";
|
url = "https://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-2.4.0.tar.gz";
|
||||||
md5 = "476a06eed08506925c700109119b6e41";
|
md5 = "b8323b1ad285544de0c3dc14ee76ddd3";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./nix.patch ];
|
patches = [ ./nix.patch ];
|
||||||
|
@ -1,38 +1,15 @@
|
|||||||
--- a/src/zc/buildout/easy_install.py 2013-08-27 22:28:40.233718116 +0200
|
--- 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
|
+++ b/src/zc/buildout/easy_install.py 2013-10-07 00:29:31.077413935 +0200
|
||||||
@@ -508,16 +508,31 @@
|
@@ -227,6 +227,12 @@
|
||||||
self._dest, os.path.basename(dist.location))
|
|
||||||
|
|
||||||
if os.path.isdir(dist.location):
|
def _satisfied(self, req, source=None):
|
||||||
- # we got a directory. It must have been
|
dists = [dist for dist in self._env[req.project_name] if dist in req]
|
||||||
- # obtained locally. Just copy it.
|
+ try:
|
||||||
- shutil.copytree(dist.location, newloc)
|
+ dists = ([dist for dist in dists
|
||||||
+ # Replace links to garbage collected eggs in
|
+ if dist.precedence == pkg_resources.DEVELOP_DIST]
|
||||||
+ # /nix/store
|
+ + [pkg_resources.get_distribution(req.project_name)])
|
||||||
+ if os.path.islink(newloc):
|
+ except pkg_resources.DistributionNotFound:
|
||||||
+ # It seems necessary to jump through these
|
+ pass
|
||||||
+ # hoops, otherwise we end up in an
|
if not dists:
|
||||||
+ # infinite loop because
|
logger.debug('We have no distributions for %s that satisfies %r.',
|
||||||
+ # self._env.best_match fails to find the dist
|
req.project_name, str(req))
|
||||||
+ 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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user