Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 34dccda9fa66
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d2c8d32b1f06
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 4, 2018

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    5c92412 View commit details
  2. python3.pkgs.multidict: add pytestcov to checkInputs

    Robert Schütz committed Nov 4, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    d2c8d32 View commit details
Showing with 26 additions and 23 deletions.
  1. +2 −2 pkgs/development/python-modules/multidict/default.nix
  2. +24 −21 pkgs/development/python-modules/virtualenv/virtualenv-change-prefix.patch
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/multidict/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib
, fetchPypi
, buildPythonPackage
, pytest, pytestrunner
, pytest, pytestrunner, pytestcov
, isPy3k
}:

@@ -14,7 +14,7 @@ buildPythonPackage rec {
sha256 = "3c11e92c3dfc321014e22fb442bc9eb70e01af30d6ce442026b0c35723448c66";
};

checkInputs = [ pytest pytestrunner ];
checkInputs = [ pytest pytestrunner pytestcov ];

disabled = !isPy3k;

Original file line number Diff line number Diff line change
@@ -13,39 +13,42 @@ it will only add the path to the python used when building
available.


diff --git a/virtualenv.py b/virtualenv.py
index d3e76a7..cb307fa 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -1051,17 +1051,7 @@ def path_locations(home_dir):
diff --git a/src/virtualenv.py b/src/virtualenv.py
index 4b57cde..afda73f 100755
--- a/src/virtualenv.py
+++ b/src/virtualenv.py
@@ -1071,20 +1071,7 @@ def path_locations(home_dir, dry_run=False):


def change_prefix(filename, dst_prefix):
- prefixes = [sys.prefix]
-
- if is_darwin:
- prefixes.extend((
- os.path.join("/Library/Python", sys.version[:3], "site-packages"),
- os.path.join(sys.prefix, "Extras", "lib", "python"),
- os.path.join("~", "Library", "Python", sys.version[:3], "site-packages"),
- # Python 2.6 no-frameworks
- os.path.join("~", ".local", "lib","python", sys.version[:3], "site-packages"),
- # System Python 2.7 on OSX Mountain Lion
- os.path.join("~", "Library", "Python", sys.version[:3], "lib", "python", "site-packages")))
- prefixes.extend(
- (
- os.path.join("/Library/Python", sys.version[:3], "site-packages"),
- os.path.join(sys.prefix, "Extras", "lib", "python"),
- os.path.join("~", "Library", "Python", sys.version[:3], "site-packages"),
- # Python 2.6 no-frameworks
- os.path.join("~", ".local", "lib", "python", sys.version[:3], "site-packages"),
- # System Python 2.7 on OSX Mountain Lion
- os.path.join("~", "Library", "Python", sys.version[:3], "lib", "python", "site-packages"),
- )
- )
+ prefixes = ["/nix/store", sys.prefix]

if hasattr(sys, 'real_prefix'):
if hasattr(sys, "real_prefix"):
prefixes.append(sys.real_prefix)
@@ -1078,6 +1068,8 @@ def change_prefix(filename, dst_prefix):
if src_prefix != os.sep: # sys.prefix == "/"
@@ -1107,6 +1094,8 @@ def change_prefix(filename, dst_prefix):
if src_prefix != os.sep: # sys.prefix == "/"
assert relpath[0] == os.sep
relpath = relpath[1:]
+ if src_prefix == "/nix/store":
+ relpath = "/".join(relpath.split("/")[1:])
return join(dst_prefix, relpath)
assert False, "Filename %s does not start with any of these prefixes: %s" % \
(filename, prefixes)
@@ -1190,6 +1182,11 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
assert False, "Filename {} does not start with any of these prefixes: {}".format(filename, prefixes)

@@ -1233,6 +1222,11 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
site_filename_dst = change_prefix(site_filename, home_dir)
site_dir = os.path.dirname(site_filename_dst)
writefile(site_filename_dst, SITE_PY)
@@ -54,6 +57,6 @@ index d3e76a7..cb307fa 100755
+ join(site_dir, 'sitecustomize.py',),
+ "import sys; sys.path.append('%s')" % wrapper_path
+ )
writefile(join(site_dir, 'orig-prefix.txt'), prefix)
site_packages_filename = join(site_dir, 'no-global-site-packages.txt')
writefile(join(site_dir, "orig-prefix.txt"), prefix)
site_packages_filename = join(site_dir, "no-global-site-packages.txt")
if not site_packages: