mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
pip-build-hook.sh: Support $pipBuildFlags
This commit is contained in:
parent
8056d8544f
commit
1298c367b1
@ -1189,6 +1189,8 @@ following are specific to `buildPythonPackage`:
|
||||
* `pipInstallFlags ? []`: A list of strings. Arguments to be passed to `pip
|
||||
install`. To pass options to `python setup.py install`, use
|
||||
`--install-option`. E.g., `pipInstallFlags=["--install-option='--cpp_implementation'"]`.
|
||||
* `pipBuildFlags ? []`: A list of strings. Arguments to be passed to `pip
|
||||
wheel`.
|
||||
* `pythonPath ? []`: List of packages to be added into `$PYTHONPATH`. Packages
|
||||
in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`).
|
||||
* `preShellHook`: Hook to execute commands before `shellHook`.
|
||||
|
@ -1,13 +1,22 @@
|
||||
# Setup hook to use for pip projects
|
||||
echo "Sourcing pip-build-hook"
|
||||
|
||||
declare -a pipBuildFlags
|
||||
|
||||
pipBuildPhase() {
|
||||
echo "Executing pipBuildPhase"
|
||||
runHook preBuild
|
||||
|
||||
mkdir -p dist
|
||||
echo "Creating a wheel..."
|
||||
@pythonInterpreter@ -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .
|
||||
@pythonInterpreter@ -m pip wheel \
|
||||
--verbose \
|
||||
--no-index \
|
||||
--no-deps \
|
||||
--no-clean \
|
||||
--no-build-isolation \
|
||||
--wheel-dir dist \
|
||||
$pipBuildFlags .
|
||||
echo "Finished creating a wheel..."
|
||||
|
||||
runHook postBuild
|
||||
|
Loading…
Reference in New Issue
Block a user