Skip to content

Commit

Permalink
Backports from nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Sep 24, 2023
1 parent 3274fd9 commit 280c537
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 46 deletions.
62 changes: 44 additions & 18 deletions overrides/build-systems.json
Original file line number Diff line number Diff line change
Expand Up @@ -1973,10 +1973,6 @@
"setuptools",
"setuptools-scm"
],
"backports-functools-lru-cache": [
"setuptools",
"setuptools-scm"
],
"backports-shutil-which": [
"setuptools"
],
Expand Down Expand Up @@ -2533,8 +2529,14 @@
"setuptools"
],
"build": [
"flit-core",
"setuptools"
{
"buildSystem": "setuptools",
"until": "0.10.0"
},
{
"buildSystem": "flit-core",
"from": "0.10.0"
}
],
"buildbot": [
"setuptools"
Expand Down Expand Up @@ -5914,11 +5916,7 @@
"setuptools"
],
"flit": [
"flit-core",
"setuptools"
],
"flit-core": [
"setuptools"
"flit-core"
],
"flit-scm": [
"flit-core",
Expand Down Expand Up @@ -7667,8 +7665,7 @@
"setuptools"
],
"installer": [
"flit-core",
"setuptools"
"flit-core"
],
"insteon-frontend-home-assistant": [
"setuptools"
Expand Down Expand Up @@ -11073,8 +11070,24 @@
"setuptools"
],
"packaging": [
"flit-core",
"setuptools"
{
"buildSystem": "setuptools",
"until": "20.4"
},
{
"buildSystem": "flit-core",
"from": "20.4",
"until": "20.8"
},
{
"buildSystem": "setuptools",
"from": "20.8",
"until": "22.0"
},
{
"buildSystem": "flit-core",
"from": "22.0"
}
],
"packbits": [
"setuptools"
Expand Down Expand Up @@ -18445,8 +18458,14 @@
"poetry"
],
"tomli": [
"flit-core",
"setuptools"
{
"buildSystem": "poetry-core",
"until": "1.0.2"
},
{
"buildSystem": "flit-core",
"from": "1.0.2"
}
],
"tomli-w": [
"flit-core",
Expand Down Expand Up @@ -19713,7 +19732,14 @@
"setuptools"
],
"wheel": [
"setuptools"
{
"buildSystem": "setuptools",
"until": "0.40.0"
},
{
"buildSystem": "flit-core",
"from": "0.40.0"
}
],
"wheel-filename": [
"setuptools"
Expand Down
33 changes: 5 additions & 28 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2856,15 +2856,12 @@ lib.composeManyExtensions [
}
);

wheel = ((
pkgs.python3.pkgs.override {
python = self.python;
wheel = self.python.isPy2 then
super.wheel.override {
inherit (self) bootstrapped-pip;
}
).wheel.override {
inherit (self) buildPythonPackage bootstrapped-pip setuptools;
}).overrideAttrs (old: {
inherit (super.wheel) pname name version src;
});
else
super.wheel;

zipp = if super.zipp == null then null else
super.zipp.overridePythonAttrs (
Expand All @@ -2875,20 +2872,6 @@ lib.composeManyExtensions [
}
);

packaging =
let
old = super.packaging;
in
# From 20.5 until 20.7, packaging used flit for packaging (heh)
# See https://github.com/pypa/packaging/pull/352 and https://github.com/pypa/packaging/pull/367
if (lib.versionAtLeast old.version "20.5" && lib.versionOlder old.version "20.8") then
addBuildSystem
{
inherit self;
drv = old;
attr = "flit-core";
} else old;

psutil = super.psutil.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++
Expand Down Expand Up @@ -3080,12 +3063,6 @@ lib.composeManyExtensions [
sourceRoot = ".";
});

wcwidth = super.wcwidth.overridePythonAttrs (old: {
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++
lib.optional self.isPy27 (self.backports-functools-lru-cache or self.backports_functools_lru_cache)
;
});

wtforms = super.wtforms.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.Babel ];
});
Expand Down

0 comments on commit 280c537

Please sign in to comment.