Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkgs/development/interpreters/python/hooks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ self: dontUse: with self;

let
inherit (python) pythonOnBuildForHost;
inherit (pkgs) runCommand;
pythonInterpreter = pythonOnBuildForHost.interpreter;
pythonSitePackages = python.sitePackages;
pythonCheckInterpreter = python.interpreter;
Expand Down Expand Up @@ -58,7 +57,6 @@ in {
pypaBuildHook = callPackage ({ makePythonHook, build, wheel }:
makePythonHook {
name = "pypa-build-hook.sh";
propagatedBuildInputs = [ wheel ];
substitutions = {
inherit build;
};
Expand All @@ -68,8 +66,8 @@ in {
# Such conflicts don't happen within the standard nixpkgs python package
# set, but in downstream projects that build packages depending on other
# versions of this hook's dependencies.
passthru.tests = import ./pypa-build-hook-test.nix {
inherit pythonOnBuildForHost runCommand;
passthru.tests = callPackage ./pypa-build-hook-tests.nix {
inherit pythonOnBuildForHost;
};
} ./pypa-build-hook.sh) {
inherit (pythonOnBuildForHost.pkgs) build;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# At least one dependency of `build` should be included here to
# keep the test meaningful
(mkConflict pythonOnBuildForHost.pkgs.tomli)
(mkConflict pythonOnBuildForHost.pkgs.wheel)
# setuptools is also needed to build the example project
pythonOnBuildForHost.pkgs.setuptools
];
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/python-modules/build/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, pytest-rerunfailures
, pytest-xdist
, pytestCheckHook
, python3
, pythonOlder
, setuptools
, tomli
Expand Down Expand Up @@ -93,6 +94,12 @@ buildPythonPackage rec {
"build"
];

# Add the wheel dependency via a wrapper.
# DO NOT use propagatedBuildInputs to prevent leakage into the build env.
makeWrapperArgs = [
''--suffix PYTHONPATH : "${wheel}/${python3.sitePackages}"''
];

meta = with lib; {
mainProgram = "pyproject-build";
description = "Simple, correct PEP517 package builder";
Expand Down