diff --git a/hooks/pip-build-hook.sh b/hooks/pip-build-hook.sh index a3ebe311d..31e06909b 100644 --- a/hooks/pip-build-hook.sh +++ b/hooks/pip-build-hook.sh @@ -5,14 +5,6 @@ pipBuildPhase() { echo "Executing pipBuildPhase" runHook preBuild - # Prefer using setup.py to avoid build-system dependencies if we have a setup.py - if [ -z "${dontPreferSetupPy-}" ]; then - if test -e setup.py && test -e pyproject.toml; then - echo "Removing pyproject.toml..." - rm -f pyproject.toml - fi - fi - mkdir -p dist echo "Creating a wheel..." @pythonInterpreter@ -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist . diff --git a/overrides.nix b/overrides.nix index 0fc41f6bc..9bdbc924c 100644 --- a/overrides.nix +++ b/overrides.nix @@ -52,7 +52,7 @@ self: super: anyio = super.anyio.overridePythonAttrs (old: { postPatch = '' - substituteInPlace setup.py --replace 'setup()' 'setup(version="${old.version}")' + substituteInPlace setup.py --replace 'setup()' 'setup(version=${old.version}")' ''; }); @@ -90,6 +90,10 @@ self: super: } ); + backcall = super.backcall.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.flit-core ]; + }); + backports-entry-points-selectable = super.backports-entry-points-selectable.overridePythonAttrs (old: { postPatch = '' substituteInPlace setup.py --replace \ @@ -118,12 +122,6 @@ self: super: } ); - black = super.black.overridePythonAttrs ( - old: { - dontPreferSetupPy = true; - } - ); - borgbackup = super.borgbackup.overridePythonAttrs ( old: { BORG_OPENSSL_PREFIX = pkgs.openssl.dev; @@ -174,11 +172,13 @@ self: super: } ); - cheroot = super.cheroot.overridePythonAttrs ( - old: { - dontPreferSetupPy = true; - } - ); + cleo = super.cleo.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.poetry-core ]; + }); + + clikit = super.clikit.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.poetry-core ]; + }); cloudflare = super.cloudflare.overridePythonAttrs ( old: { @@ -199,10 +199,14 @@ self: super: buildInputs = (old.buildInputs or [ ]) ++ [ self.toml ]; + } + ); - postPatch = '' - substituteInPlace setup.py --replace 'setuptools.setup()' 'setuptools.setup(version="${old.version}")' - ''; + crashtest = super.crashtest.overridePythonAttrs ( + old: { + buildInputs = (old.buildInputs or [ ]) ++ [ + self.poetry-core + ]; } ); @@ -563,6 +567,10 @@ self: super: } ); + html5lib = super.html5lib.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.flit-core ]; + }); + httplib2 = super.httplib2.overridePythonAttrs (old: { propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pyparsing ]; }); @@ -636,22 +644,12 @@ self: super: old: { propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ lib.optional self.python.isPy2 self.pathlib2; - # disable the removal of pyproject.toml, required because of setuptools_scm - dontPreferSetupPy = true; - postPatch = old.postPatch or "" + (lib.optionalString ((old.format or "") != "wheel") '' substituteInPlace setup.py --replace 'setuptools.setup()' 'setuptools.setup(version="${old.version}")' ''); } ); - importlib-resources = super.importlib-resources.overridePythonAttrs ( - old: { - # disable the removal of pyproject.toml, required because of setuptools_scm - dontPreferSetupPy = true; - } - ); - intreehooks = super.intreehooks.overridePythonAttrs ( old: { doCheck = false; @@ -670,11 +668,13 @@ self: super: buildInputs = (old.buildInputs or [ ]) ++ [ self.toml ]; - # disable the removal of pyproject.toml, required because of setuptools_scm - dontPreferSetupPy = true; } ); + jeepney = super.jeepney.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.flit-core ]; + }); + jira = super.jira.overridePythonAttrs ( old: { inherit (pkgs.python3Packages.jira) patches; @@ -706,12 +706,6 @@ self: super: } ); - jsonpickle = super.jsonpickle.overridePythonAttrs ( - old: { - dontPreferSetupPy = true; - } - ); - jsonslicer = super.jsonslicer.overridePythonAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkgconfig ]; buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.yajl ]; @@ -768,10 +762,6 @@ self: super: propagatedBuildInputs = [ pkgs.libvirt ]; }); - licensecheck = super.licensecheck.overridePythonAttrs (old: { - dontPreferSetupPy = true; - }); - llvmlite = super.llvmlite.overridePythonAttrs ( old: let @@ -1087,6 +1077,10 @@ self: super: ''; }); + pastel = super.pastel.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.poetry-core ]; + }); + paramiko = super.paramiko.overridePythonAttrs (old: { doCheck = false; # requires networking }); @@ -1152,8 +1146,6 @@ self: super: buildInputs = (old.buildInputs or [ ]) ++ [ self.toml ]; - # disable the removal of pyproject.toml, required because of setuptools_scm - dontPreferSetupPy = true; } ); @@ -1816,8 +1808,6 @@ self: super: buildInputs = (old.buildInputs or [ ]) ++ [ self.toml ]; - # disable the removal of pyproject.toml, required because of setuptools_scm - dontPreferSetupPy = true; } ); @@ -2226,13 +2216,6 @@ self: super: } ); - lazy-object-proxy = super.lazy-object-proxy.overridePythonAttrs ( - old: { - # disable the removal of pyproject.toml, required because of setuptools_scm - dontPreferSetupPy = true; - } - ); - pendulum = super.pendulum.overridePythonAttrs (old: { # Technically incorrect, but fixes the build error.. preInstall = lib.optionalString stdenv.isLinux '' @@ -2240,6 +2223,10 @@ self: super: ''; }); + ptyprocess = super.ptyprocess.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.flit-core ]; + }); + pygraphviz = super.pygraphviz.overridePythonAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ]; buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.graphviz ]; @@ -2273,6 +2260,10 @@ self: super: buildInputs = (old.buildInputs or [ ]) ++ [ self.pbr ]; }); + tomlkit = super.tomlkit.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ self.poetry-core ]; + }); + tomli = super.tomli.overridePythonAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.flit-core ]; });