This adds a useful hook to be used for projects that use stestr,
it is primiative at the moment but covers most scenarios for using
it.
This PR also changes a Python module to start using it, once it
lands, follow up PRs can update all of them to use it tree-wide.
Signed-off-by: Vinetos <contact+git@vinetos.fr>
Prior to this change all python packages using `setuptools-rust` were broken when cross compiled as they built binaries for the build platform instead of for the host platform.
The setuptoolsRustBuildHook hook would have to be included as a native build input instead of the `setuptools-rust` package, but practically wasn't used anywhere.
This change makes it so that `setuptoolsRustBuildHook` becomes unnecessary, and instead `setuptools-rust` propagates a setup-hook directly setting up the build environment, similar to how cmake does it when included via nativeBuildInputs.
This change fixes cross on all packages using `setuptools-rust` as a build-system.
Fix the unterminated here document of the pytest-check-hook.sh
error mesage by moving the EOF of the here document
between the parenthesis of the process substitution.
Wrap each elements of disabledTests with parenthesis
so that when __structuredAttrs = true,
people could use sub-expressions an element.
E.g.
```nix
{
disabledTests = [
"ClassFoo and test_foo"
"test_bar"
];
}
Errors in Bash's process substitution doesn't get propagated outside.
Replace the process substitution with Python's `-` as /dev/stdin and
Bash's heredoc stdin redirection.
Add flag pytestFlags as the new, conforming interface
replacing pytestFlagsArray.
Stop Bash-expanding disabledTests and disabledTestPaths.
Handle disabledTestPaths with `pytest --ignore-glob <path>`
to keep globbing support.
Check if each path glob matches at least one path
using the `glob` module from the Python standard library.
Also make buildPythonPackage and buildPythonApplication
stop escaping the elements of disabledTests and disabledTestPaths.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 57b193d8dd
result/bin/apply-formatting $NIXPKGS_PATH
Those would be problematic with __structuredAttrs turned on, because
they'd turn those nice bash arrays back into strings - and potentially
lose some of the values on the way.
Updating to prereleases should be possible, but making this an option is
difficult, given that for packages with many consumers you would have to
set it in each consumer.
We thoroughly test the package set, so allowing prereleases unconditionally
shouldn't be too bad.
Closes: #301698
Use lib.overrideDerivation instead of <pkg>.overrideDerivation
to fix the evaluation of
python3Packages.pythonCatchConflictsHook.tests.catches-conflict-multiple-chains,
as buildPythonPackage and buildPythonApplication no longer provide
<pkg>.overrideDerivation
Clean up the leftover of commit 58bfe74123 ("buildPython*:
Deprecate and remove (buildPython* { ... }).override")
Always specify the postPhases attribute as a list instead of a string.
Append elements to the postPhases Bash variable using appendToVar
instead of string or Bash array concatenation.
Always specify the preDistPhases attribute as a list instead of a string.
Append elements to the preDistPhases Bash variable using appendToVar
instead of string or Bash array concatenation.
Handle element insertion before a specific element using string
substitution as before, but handle both structured and unstructured
attributes.
Always specify the preInstallPhases attribute as a list instead of a
string.
Append elements to the preInstallPhases Bash variable using appendToVar
instead of string or Bash array concatenation.