mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
buildPythonPackage: be able to disable package conflict check
This commit is contained in:
parent
5b7c6a11b5
commit
3ea8068181
@ -532,6 +532,7 @@ All parameters from `mkDerivation` function are still supported.
|
||||
* `makeWrapperArgs`: A list of strings. Arguments to be passed to `makeWrapper`, which wraps generated binaries. By default, the arguments to `makeWrapper` set `PATH` and `PYTHONPATH` environment variables before calling the binary. Additional arguments here can allow a developer to set environment variables which will be available when the binary is run. For example, `makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`.
|
||||
* `installFlags`: A list of strings. Arguments to be passed to `pip install`. To pass options to `python setup.py install`, use `--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"].
|
||||
* `format`: Format of the source. Options are `setup` for when the source has a `setup.py` and `setuptools` is used to build a wheel, and `wheel` in case the source is already a binary wheel. The default value is `setup`.
|
||||
* `catchConflicts` If `true`, abort package build if a package name appears more than once in dependency tree. Default is `true`.
|
||||
|
||||
#### `buildPythonApplication` function
|
||||
|
||||
|
@ -42,6 +42,9 @@
|
||||
# Additional flags to pass to "pip install".
|
||||
, installFlags ? []
|
||||
|
||||
# Raise an error if two packages are installed with the same name
|
||||
, catchConflicts ? true
|
||||
|
||||
, format ? "setup"
|
||||
|
||||
, ... } @ attrs:
|
||||
@ -141,7 +144,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
|
||||
|
||||
postFixup = attrs.postFixup or ''
|
||||
wrapPythonPrograms
|
||||
|
||||
'' + lib.optionalString catchConflicts ''
|
||||
# check if we have two packages with the same name in closure and fail
|
||||
# this shouldn't happen, something went wrong with dependencies specs
|
||||
${python.interpreter} ${./catch_conflicts.py}
|
||||
|
Loading…
Reference in New Issue
Block a user