adisbladis
cacc1ebd37
mk-poetry-dep: Use wheel platform filtering from pyproject.nix
2023-11-02 22:41:31 +13:00
adisbladis
4099e32cb9
Revert "mk-poetry-dep: Use wheel platform filtering from pyproject.nix"
...
This reverts commit 02b932909d
.
2023-11-01 21:35:51 +13:00
adisbladis
02b932909d
mk-poetry-dep: Use wheel platform filtering from pyproject.nix
2023-11-01 21:27:42 +13:00
adisbladis
177fad817a
Merge pull request #1298 from Pegasust/wheel-url-support
...
Add wheel url support
2023-10-29 01:28:48 +13:00
adisbladis
32f94fd9cd
mk-poetry-dep: use poetry extended pep440 parser
2023-10-28 23:26:20 +13:00
adisbladis
ef4e605bc6
Use PEP440 version conditions from pyproject.nix
2023-10-27 13:37:58 +13:00
pegasust
59acbb08ec
feat: support whl url
2023-10-26 05:18:11 -04:00
Phillip Cloud
65f59a49ab
chore: address statix and deadnix lints
2023-10-26 05:09:13 -04:00
adisbladis
841aa10e1b
Use fetchers from pyproject.nix
2023-10-26 17:13:24 +13:00
adisbladis
15185adb4c
vendor: bump pyproject.nix
2023-10-26 17:02:10 +13:00
Anders Kaseorg
65ab8f0aab
Respect subdirectory from poetry.lock when fetching sources
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-10-26 16:08:53 +13:00
adisbladis
960343e97c
Use PEP-599 platform definitions from pyproject.nix
2023-10-26 13:55:33 +13:00
adisbladis
3a448dd440
Use normalizePackageName from pyproject.nix
2023-10-26 12:48:05 +13:00
adisbladis
b7617a7c4c
pep508: Reimplement using pyproject.nix
2023-10-26 12:48:05 +13:00
Phillip Cloud
87c7794853
chore: use pip build hook
2023-10-24 08:29:43 -04:00
Phillip Cloud
9316bf3916
style: remove unnecessary parens
2023-10-24 08:29:36 -04:00
Phillip Cloud
fce7cb48c3
chore: bring back the pypa build hook
2023-10-24 08:29:31 -04:00
Phillip Cloud
e0351878f1
chore: checkpoint
2023-10-24 08:29:24 -04:00
Phillip Cloud
d0a117a06b
style: run nixpkgs-fmt
2023-07-25 07:44:43 -04:00
Phillip Cloud
5d9e60be13
chore: look at anything that could indicate a ref/rev
2023-07-25 07:20:14 -04:00
Phillip Cloud
c1e1486d6a
fix: also use allRefs = true
when branch is given
2023-07-25 06:56:56 -04:00
Åsmund Østvold
b7b50835d5
Fix backwards incompatibility in fetchGit
...
The submodule argument was introduced in version >= 2.4
2023-06-12 16:01:16 +02: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
Ryan Swart
0e9c1d8599
fix: wheel is not tarball...
2023-01-17 21:41:17 +08:00
Ryan Swart
1a2045ef51
fix: use hash on url dep
2023-01-17 20:08:24 +08:00
Phillip Cloud
ffa5261510
fix: disallow the wheel package to preferWheels
...
Otherwise an infinite recursion error occurs.
2023-01-12 05:33:38 -05:00
Robert Hensing
31e6d68d59
feat: Show lock location in package errors
...
Tested by temporarily setting `meta.broken = true;` in
`mk-poetry-dep.nix`, and then
$ nix-build tools -A env
error: Package ‘python3.9-click-8.1.3’ in /home/user/h/poetry2nix/tools/poetry.lock:0 is marked as broken, refusing to evaluate.
a) To temporarily allo[...]
As you can see, the location of the lock file is reported, which
is especially useful in Nixpkgs, which contains multiple lockfiles.
This used to be just the location of a generic python builder, which
is generally not what the user wants.
I've exposed the `poetrylockPos` variable as a parameter that callers
may set. This is intended as a contingency more so than a feature that
is useful to users. That's why I've decided not to document it,
because it would just add noise.
2023-01-03 16:38:09 +01:00
Bouke van der Bijl
75195c5074
Fetch git submodules
...
Poetry also fetches submodules when downloading a git dependency
2022-12-07 19:12:54 +01:00
László Vaskó
25254807bc
mkPoetryDep: always calculate dependencies in when installing from files
...
`isSource` can be true e.g. when the package comes from a private
registry but we can still figure out e.g. manylinux dependencies based
on the fiename
2022-11-30 08:46:29 +01:00
K900
2c5c418746
fix: pull in hooks directly instead of sneaking them in through pythonPackages
...
This does technically break people that override hooks, but they deserve it.
2022-10-28 00:40:18 +03:00
adisbladis
b95cbe19ab
fix build for many wheel packages
2022-10-08 03:23:23 +13:00
adisbladis
e31b5e4d29
mk-poetry-dep: prevent use of output separation
...
this doesn't work in a lot of cases and I don't see the point for us
to have the split output behaviour.
2022-10-07 23:30:49 +13:00
K900
33db1f30d0
feat: big messy refactoring
...
- normalize package names to match PEP-503
- don't assume build dependencies on setuptools{,-scm}
- automatically generate overrides for setuptools{,-scm}
- pull known build systems directly from nixpkgs
- fix a bunch of mostly unrelated warnings
Co-authored-by: Phillip Cloud <417981+cpcloud@users.noreply.github.com>
2022-10-06 19:54:08 +03:00
Samuel Cormier-Iijima
5ae5d85e56
Fix determining sourceSpec for git dependencies in pyproject.toml
...
Fixes #702
2022-09-08 16:02:32 -04:00
K900
a6480f2ce6
fix: also ignore typing-extensions when resolving dependencies
...
Fixes infinite recursion with recent setuptools-scm.
2022-06-28 09:40:15 +03:00
adisbladis
62bab8891f
Fix infinite recursion in project with flit-core
...
Closes #538
2022-02-05 13:54:22 +12:00
adisbladis
9b5fba1b71
Fix cross compilation and add cross test
2022-01-19 04:35:12 +12:00
adisbladis
230e4fbb48
Remove __isBootstrap hack
...
Since #466 was merged we don't need it anymore.
2022-01-19 02:20:37 +12:00
adisbladis
23be9b3cb0
Merge pull request #466 from cpcloud/remove-bootstrap-poetry
...
build: remove bootstrap dependency on poetry
2022-01-18 15:18:22 +12:00
László Vaskó
8e1eef3751
fetchGit: use allRefs
only when it is needed
...
If `branch` or `tag` is given in sourceSpec, then `fetchGit` would
work as before, the only problematic setup is `rev` when used with Nix 2.4+
2022-01-18 09:53:24 +12:00
László Vaskó
5c06704d45
fetchGit: work-around bug in Nix 2.4
...
Another approach to make `poetry2nix` work with dependencies specified
by arbitrary `rev=<hash>` values on newer Nix revisions.
Relates-to: https://github.com/nix-community/poetry2nix/pull/358
Relates-to: https://github.com/NixOS/nix/issues/5128
2022-01-18 09:53:24 +12:00
Phillip Cloud
261d1d5b22
fix: remove buildInput dependency on poetry
2021-12-29 09:32:41 -05:00
Phillip Cloud
2fed7bc910
pip: remove restriction
2021-11-08 08:07:04 -05:00
adisbladis
6457976cf6
Extend setuptools-scm infinite recursion workaround
2021-09-22 22:39:14 -05:00
Phillip Cloud
3fb12decf1
fix: add tomli to recursion list
2021-09-19 09:45:41 -04:00
Rowan Skewes
5cd5f01c90
enable '+' in versions
2021-09-17 17:06:44 +10:00
Niels Kristian Lyshøj Jensen
2eb8329319
Add support for local files
2021-07-10 13:38:34 +02:00
adisbladis
8ca15bdb12
Improve error message in case of a missing suitable source/wheel for a dependency
2021-07-02 04:25:00 -05:00
Antoine Eiche
28fba9f743
Add support to the legacy Pypi API
...
Some private repositories (such as Devpi) expose the legacy Pypi
API (https://warehouse.pypa.io/api-reference/legacy.html ).
This commit adds a dedicated fetcher which basically queries this API
to get the URL pointing to the actual file.
Since Pypi still exposes this API, it has been possible to write a
test that uses this legacy API.
Fixes https://github.com/nix-community/poetry2nix/issues/277 .
2021-06-01 16:25:29 -05:00
adisbladis
4b651e043e
Merge pull request #304 from andir/fetch-api
...
Always fallback to querying the Pypi API when the predicted URL 404s
2021-06-01 16:14:37 -05:00