Commit graph

149 commits

Author SHA1 Message Date
adisbladis
9dfb080d3f
Add canonicalisation of module names
This shouldn't be required and I think that these are actually
packaging bugs and not something that poetry2nix should really be
concerned with.

Closes #84
2020-04-15 10:24:46 +01:00
adisbladis
f7e435407e
nixpkgs-fmt all the things (again...) 2020-03-14 23:13:51 +00:00
adisbladis
2e55b2e95a
Remove the doc attribute
It was never really used by anything and it's output is not really
useful at this moment.
2020-02-29 14:07:28 +00:00
adisbladis
bb3c2d57d5
Add a default source filter when projectDir is used
Also use the same source filter for path deps.

The default source filter currently filters:
- Filters gitignore (if it exists, non-recursive)
- Filters pycache/pyc files
- Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks
2020-02-29 12:05:23 +00:00
adisbladis
b85e2a6733
Set src to lib.cleanSource projectDir by default
Ideally we'd use `nix-gitignore` but that one fails when there is no
`.gitignore` file so it's not a sensible default.
2020-02-29 12:04:36 +00:00
adisbladis
29a3282aef
tests: Create callTest function 2020-02-28 14:01:51 +00:00
Tobias Pflug
b3870576f8 Provide withDefaults and withoutDefaults
This adds the convenience functions withDefaults and
withoutDefaults which simply wrap the provided argument in a list
either with or without the default poetry overrides.

Tests have also been adapted to make use of `withDefaults` where
appropriate.
2020-02-25 14:24:48 +01:00
adisbladis
dc88082f58
Add support for python version constraints from pyproject.toml
Pep508 markers alone are not always enough, see #50

This sadly introduces a minor breakage in `mkPoetryEnv`.
2020-02-24 12:25:51 +00:00
adisbladis
1c3ab5388a
Comment pypy tests
Pypy seems to have had some recent nixpkgs breakage unrelated to poetry2nix
2020-02-23 14:37:01 +00:00
Steve Purcell
b013b7a1c9 Add failing test for two-layer inclusion of "path" dependencies 2020-02-18 15:58:17 +13:00
adisbladis
1ffabaa066
Prevent infinite recursion for setuptools-scm extras 2020-01-28 19:42:35 +00:00
adisbladis
3ade93a0e1
Assert URL actually wheel url in preferWheel test 2020-01-21 12:31:00 +00:00
adisbladis
7170aad633
Add Pypy support (#40) 2020-01-18 20:29:07 +00:00
Oleh Stolyar
719f74ef4c Add a closure size test
Can fail with the following:

output '/nix/store/dxxkcgkl4qfypf97jcw96lgba671hqmb-closure-size-1.0.0' is not allowed to refer to the following paths:
  /nix/store/9bi4j2k7bnqprn6h2ijn63xgskdgacxk-poetry-1.0.2
  /nix/store/bqr68255raz3icc73nq6788105v0r748-postgresql-11.6
  /nix/store/qksib0d7ygx1mmqk7172yjz02ya13lsh-gcc-9.2.0
2020-01-17 15:45:16 +00:00
adisbladis
2751a7fa0d
Add overrides required to build poetry with python2 2020-01-13 15:43:56 +00:00
adisbladis
d224eabc6a
Re-enable Qt5 test
I've added `sip` to the environment which makes the package work
regardless of what version of sip is in nixpkgs.
2020-01-13 10:43:43 +00:00
adisbladis
d887ec4602
Disable pyqt5 test for now
We are waiting for an update of python3Packages.sip to hit nixpkgs
2020-01-13 00:28:39 +00:00
adisbladis
8591164784
Add overrides to build pyqt5
Extra functionality exposed in nixpkgs needs further overrides.
2020-01-13 00:27:14 +00:00
adisbladis
301760e845
Remove getAttrDefault
Nix has built-in syntax for this operation, so lets use it.
2020-01-13 00:27:10 +00:00
adisbladis
2f59f1db2a
Fix Egg support 2020-01-12 20:00:17 +00:00
adisbladis
b520fa1fce
Add ability to skip tests through environment 2020-01-12 19:58:59 +00:00
adisbladis
136f008a03
Add preferWheel option to <derivation>.override
Previously override wasn't really useful as it inherited the args from
buildPythonPackage.
Now we can create custom args for overrides.
2020-01-12 19:38:22 +00:00
adisbladis
c1ce6163be
Implement more operators 2020-01-09 12:18:38 +00:00
adisbladis
cebf3ced84
Add support for eggs 2020-01-08 14:03:01 +00:00
adisbladis
2831d5e3e8
nixpkgs-fmt all the things 2020-01-02 22:23:07 +00:00
adisbladis
f73807d3dc
Add missing test files 2020-01-02 22:02:56 +00:00
adisbladis
e9e5ce266e
Allow taking functors as overlays
This allows for making the default overrides customisable by exposing
them as a set with an override function.
2020-01-02 21:56:08 +00:00
adisbladis
9b33e9e3b6
Make overrides export the overlay function
This is preparation work for providing a function that allows
customising the overrides.
2020-01-02 18:07:14 +00:00
adisbladis
6649395d84
Add doc to tests 2020-01-01 18:01:04 +00:00
adisbladis
4acf604723
Add support for local path dependencies 2019-12-29 13:20:35 +00:00
zimbatm
53ce9bdf72
add path-deps test 2019-12-28 22:45:10 +00:00
adisbladis
bf48f272c1
Add CLI to supplement git hashes
This is not required for private repos where builtins.fetchGit would
suffice but _is_ required for Hydra (nixpkgs) where builtins.fetchGit is not allowed.
2019-12-28 21:45:51 +00:00
zimbatm
46cc4c74fc
test: add git-deps 2019-12-27 19:17:35 +00:00
adisbladis
908c9b8881
Restrucure overrides as composable overlays 2019-12-20 13:39:35 +00:00
Tobias Pflug
54b43703f9 nixpkgs-fmt formatting 2019-12-17 21:16:28 +01:00
Tobias Pflug
3a1eb66fbc Improve PEP425 support
Make sure that whl files using notation such as "py2|py3|py2.py3"
and/or files using "any" in the `abi` tag are accepted as well.
2019-12-17 18:13:11 +01:00
Tobias Pflug
813175bc19 Fix override test 2019-12-17 15:06:09 +01:00
Andreas Rammhold
5c76155666 add mkPoetryEnv to create poetry python environments 2019-12-17 14:19:32 +01:00
Tobias Pflug
edf06fcf6d Update lockfile for top-packages-1 test 2019-12-17 12:41:36 +01:00
Tobias Pflug
08eb9637aa Remove default values and drop src from mkPoetryPyhon
Drp `poetrylock` and `pyproject` mandatory arguments
without default values and drops `src` from `mkPoetryPyhon`.

Fix test invocations with invalid arguments.
2019-12-17 12:38:34 +01:00
Tobias Pflug
e529d26109 Disable manylinux test
The manylinux support works but needs to remain disabled until the
necessary nixpkgs changes have been merged and propagated.
2019-12-16 19:01:16 +01:00
Andreas Rammhold
d8fde74219
split mkPoetryPackage into mkPoetryPython and mkPoetryApplication 2019-12-16 15:03:49 +01:00
Tobias Pflug
84f27ee31d
Refactoring
- Extract utility functions to ./lib.nix
- Extract buildPythonPackage to ./mk-poetry-dep.nix
- Replace some functions with existing builtin functions
- Use lib.partition for python package splitting
- Drop package filtering on the top-level and leave it to pep425.nix
2019-12-16 15:03:49 +01:00
Tobias Pflug
29c93b1dc2
Add wheel file selection according to pep425
Provides a `select` function that picks the most appropriate `.whl` file
based on platform, arch, python version and manylinux/OSX - version.

- Adds unit tests for pep425
- Adds test for manylinux support
- Fixes overrides: `passhtru` must be extended, not overwritten
- Don't strip python packages: this screws up manylinux binaries
2019-12-16 15:02:41 +01:00
zimbatm
7c2f93a690
ci: test on 19.09 and unstable
Only test the trivial test on 19.09 for now to make sure that the basis
is working. Some other test is failing and needs to be debugged.
2019-12-13 18:35:18 +01:00
zimbatm
3f1af1a94f
tests: enable trivial test
Fixes a bug logic that was aliasing the trivial name to the override
test
2019-12-13 18:35:18 +01:00
zimbatm
4dcee62396
tests: unique names for each
This makes it easier to see which test has failed
2019-12-13 18:35:18 +01:00
zimbatm
310282154c
nixpkgs-fmt: format all the nix code 2019-12-11 13:31:22 +01:00
Tobias Pflug
1bfd3d192b
Add more tests
This adds the following new tests:

- trivial:           minimaltest case
- override-support:  verify overriding
- common-pkgs-1/2:   verify commonly downloaded pypi pkgs can be built

Also adds some overrides as needed by some of the
tested packages.
2019-11-29 10:07:06 +00:00