Commit graph

39 commits

Author SHA1 Message Date
pegasust
88a99da819
chore: reformat and relax test on nix sandbox 2023-10-26 05:18:15 -04:00
pegasust
59acbb08ec
feat: support whl url 2023-10-26 05:18:11 -04:00
Phillip Cloud
76d7d3825d
chore: remove more unused hooks 2023-10-24 08:29:48 -04:00
Phillip Cloud
ae2f682717
chore: remove unused pip-install-hook.sh 2023-10-24 08:29:46 -04:00
Phillip Cloud
87c7794853
chore: use pip build hook 2023-10-24 08:29:43 -04:00
Phillip Cloud
e0351878f1
chore: checkpoint 2023-10-24 08:29:24 -04:00
Phillip Cloud
b279a0fa55
chore: add hooks 2023-10-24 08:24:53 -04:00
Phillip Cloud
85feb8081f
chore: add hooks 2023-10-24 08:24:50 -04:00
Remi Gelinas
f9befdc387
feat: add changelog files to fixup hook 2023-07-31 20:07:01 -04:00
adisbladis
3574039b65 hooks: Read setup.py AST as utf-8 with BOM
The AST module throws errors on encountering a BOM.
For a file without a BOM this change makes no difference, but for one with a BOM, the mark character is skipped.
2023-03-28 16:57:30 +13:00
adisbladis
709d422980 hooks: Prefer using propagatedBuildInputs over deps
The current check if makeSetupHook takes `deps` returns true because
of backwards compat in nixpkgs that emits a trace on use.

By checking for propagatedBuildInputs instead we check for the new behaviour first.
2023-03-24 14:31:25 +13:00
adisbladis
1a79e628b9 Add a hook to rewrite python_requires in setup.py to be PEP440 compliant
Upstream packaging has changed and using wildcards in python_requires is now considered a bug as it's not PEP400 compliant.
Realistically we have to work around this issue as we can't expect every older version to change.

We do this by rewriting the problematic definitions and dropping the
version precision. This works out because 3.9.* is functionally
equivalent to 3.9.
2023-03-23 15:23:57 +13:00
Phillip Cloud
378da0d1fc chore: prevent makeSetupHook warning on later nixpkgs 2023-03-06 09:43:28 +13:00
adisbladis
01f4b9c597 site-packages fixup hook: Also remove LICENSE files
Reported privately by @matthewcroughan.
2022-09-07 07:55:10 +12:00
Xing Yang
bb9a82da44 Fix build failure when editable dependencies exist in pyproject.toml 2022-07-24 21:03:23 +01:00
Sem Mulder
e4a98cf325 Reset PYTHONPATH before running Python script in hooks 2022-05-10 08:14:08 +12:00
Sem Mulder
59a79de540 Don't change format of pyproject.toml when removing special dependencies
This is needed because Scipy parses pyproject.toml by hand, under
the assumption of one dependency per line.
2022-05-10 08:14:08 +12:00
adisbladis
31effa4e4e Add hook to remove normal files from site-packages
This is a fairly common packaging mistake that it's better that we solve in a hook than in one-by-one in overrides.

Normal files in site-packages isn't always a mistake, so we can't clean them up wholesale, but we can clean up some common mistakes.
2022-02-05 21:50:20 +12:00
adisbladis
8be11cbe8f Remove dontPreferSetupPy & don't remove pyproject.toml ever
It seems like this bandaid to avoid some build-system related overrides causes more problems than it fixes.
Let's just deal with reality up-front and hope that https://github.com/python-poetry/poetry/issues/2789 will be fixed at some point.
2022-01-18 15:18:57 +12:00
adisbladis
8078110a7f Reformat all Python code using Black 2022-01-12 18:48:06 +13:00
adisbladis
d26cd8d7c5 fix: Only set ensure_ascii to False for Python >= 3 2022-01-12 18:07:34 +13:00
Phillip Cloud
6626c0425a
fix: set ensure_ascii to False because utf8 is legit 2021-12-29 12:35:59 -05:00
Phillip Cloud
81d9e93b33
docs(pyproject-without-special-deps.py): fix help string 2021-11-08 09:19:00 -05:00
Phillip Cloud
b95fe190ce
refactor(pyproject-without-special-deps.py): use bools instead of ints 2021-11-08 09:17:42 -05:00
Phillip Cloud
9a495722ef
refactor(pyproject-without-special-deps.py): remove unused variable 2021-11-08 09:09:02 -05:00
Phillip Cloud
7e026ee184
docs(pyproject-without-special-deps.py): clean up comment 2021-11-08 09:08:40 -05:00
Phillip Cloud
2fed7bc910
pip: remove restriction 2021-11-08 08:07:04 -05:00
adisbladis
123257b607
Add verbose pip build output
Currently the output is terse and next to useless.
2021-06-28 21:44:15 -05:00
adisbladis
d460ed2be1
Fix cross compilation support in hooks 2020-11-27 16:14:19 +01:00
adisbladis
98e0220502
Use build packages in setup hook
https://github.com/NixOS/nixpkgs/pull/104201 broke this.
2020-11-26 20:28:09 +01:00
adisbladis
52a484be33
Reformat with nixpkgs-fmt 1.0.0 2020-10-01 19:08:57 +02:00
adisbladis
b6f9670d56
overrides: Remove condition from wheel override 2020-08-17 05:02:19 +02:00
adisbladis
db06bdd6e7
Format with nixpkgs-fmt 0.9 2020-05-19 21:06:02 +01:00
adisbladis
4ebbfdacd1
nixpkgs-fmt broke it's format yet again 2020-04-29 14:12:59 +01:00
adisbladis
b9221f61b5
Automatically build most packages without passing format param
We should never have to use `format = "setuptools"` since pip can
_also_ handle setuptools packages.

This uses a custom pipBuildHook that removes pyproject.toml in case
there is also a setup.py in the same sources.
2020-04-01 00:14:30 +01:00
adisbladis
f7e435407e
nixpkgs-fmt all the things (again...) 2020-03-14 23:13:51 +00:00
adisbladis
090e2dd957
Add fixup hook
This hook should fix common mistakes like installing `tests` in
site-packages which leads to collisions.
2020-02-28 19:45:23 +00:00
adisbladis
c1b21de0ba
Check if pyproject.toml exists before patching path deps
Local path dependencies may be setuptools projects.
2020-02-28 19:27:33 +00:00
adisbladis
0367b93492
Turn pyproject.toml patching into a hook
We should not be setting pre/post phases as it's counter intuitive
when working with overrides.
2020-02-23 14:37:01 +00:00