adisbladis
bbd264076a
Add suport for overriding the app together with dependencyEnv
...
And extend with support for all buildEnv args
2020-05-08 18:51:25 +01:00
Silvan Mosberger
d7d4fdc8de
Introduce dependencyEnv passthru
2020-05-08 18:27:51 +01:00
adisbladis
4aa4f74864
Release 1.8.0
2020-05-05 20:55:44 +01:00
adisbladis
4ebbfdacd1
nixpkgs-fmt broke it's format yet again
2020-04-29 14:12:59 +01:00
Raito Bezarius
54f4afca6d
Enable global preference for wheels for top-level functions
2020-04-29 14:08:21 +01:00
adisbladis
e164fdd78a
Fix semver pythonVersion checks
...
We're only looking at the major.minor currently. We need to look
major.minor.patch instead.
This is made slighty problematic non-cpython where the patch version
doesn't match. If major.minor is the same for both the Python version
& the derivation version we default to derivation.version otherwise we
set the pythonVersion to pythonVersion major.minor.0.
2020-04-29 13:22:20 +01:00
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
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
6a77db8213
Release 1.7.1
2020-03-27 23:17:11 +00:00
adisbladis
6ffeafff3c
Release 1.7.0
2020-03-27 22:39:38 +00:00
adisbladis
df8c9819f4
Fix git dependencies on non-default branches
...
Closes #73
2020-03-27 19:13:12 +00:00
adisbladis
cec428df49
Release 1.6.1
2020-03-27 14:33:15 +00:00
adisbladis
f7e435407e
nixpkgs-fmt all the things (again...)
2020-03-14 23:13:51 +00:00
Oleh Stolyar
a3655babd4
Do not leak projectDir into expressions
...
Fixes caching issues.
2020-03-12 13:06:06 +00:00
adisbladis
06d9687c0f
Prepare for release 1.6.0
2020-02-29 14:07:31 +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
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
1f413d27c9
Implement a proper fix for #52
...
We need to check pyproject.toml & poetry.lock constraints
_separately_.
Consider the following scenario:
- `poetry` depends on `tox` which in turn depends on `virtualenv`.
- `poetry` _also_ depends directly on virtualenv, but only for older
python versions.
In this case we don't want `virtualenv` as a direct input to `poetry`
but we _do_ want it as an input for `tox`.
2020-02-28 14:01:46 +00:00
adisbladis
7f7499462f
Set meta.platforms to something reasonable by default
2020-02-28 08:38:36 +00:00
Tobias Pflug
e1e3b90be2
Drop meta
attribute for mkPoetryPackages/mkPoetryEnv
...
The `meta` attribute is only relevant for `mkPoetryApplication`
and can safely be dropped elsewhere.
2020-02-26 09:24:23 +01:00
adisbladis
9dae5620ea
Add projectDir parameter
...
Turns
```
poetry2nix.mkPoetryEnv {
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
pwd = ./.;
python = python3;
}
```
into
```
poetry2nix.mkPoetryEnv {
projectDir = ./.;
python = python3;
}
```
2020-02-25 14:40:36 +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
f4110f181a
Remove poetryPkg argument from public APIs
2020-02-25 10:01:42 +00:00
adisbladis
5691ea49bd
Bump poetry2nix version number to 1.5.0
2020-02-24 12:42:20 +00:00
adisbladis
5d902c8bab
Slightly improve evaluation performance
2020-02-24 12:41:42 +00:00
Utku Demir
f4b70664c2
Expose mkPoetryPackages
2020-02-24 12:38:15 +00:00
adisbladis
4d9bee6f81
Refactor mkPoetryPython (mkPoetryPackages)
...
- Renamed mkPoetryPython to mkPoetryPackages as it's more descriptive
We intend to expose this function soon so a better name is in order.
- Put TOML parsing inside mkPoetryPackages to unify parsing and avoid double parsing.
2020-02-24 12:25:55 +00: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
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
Steve Purcell
71cdd20018
Remove "path" dependencies in indirectly referenced packages
2020-02-18 15:58:31 +13:00
adisbladis
2caffda3ef
Use the canonical name setuptools-scm
...
Nixpkgs calls this setuptools_scm which is a mismatch for pypi.
Create an alias so any setuptools-scm installed by a user impacts all packages.
2020-01-21 12:12:36 +00:00
adisbladis
7170aad633
Add Pypy support ( #40 )
2020-01-18 20:29:07 +00:00
Oleh Stolyar
58eb9e63a7
Make it possible to pass additional nativeBuildInputs
...
..to mkPoetryApplication
2020-01-17 15:45:16 +00:00
Oleh Stolyar
5c943c6964
Do not depend on contents of pwd ( #38 )
...
Prevent Nix from copying the project directory to store by removing it
from args passed to buildPythonApplication.
2020-01-17 14:39:51 +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
f394798d72
Add full operator support
2020-01-09 12:48:07 +00:00
adisbladis
2831d5e3e8
nixpkgs-fmt all the things
2020-01-02 22:23:07 +00:00
adisbladis
45ab57b0e3
Bump version to 1.1.0
2020-01-02 21:57:35 +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
e121613551
Fix nixpkgs-fmt
2020-01-01 18:31:00 +00:00
adisbladis
c540d55971
Use lib.composeExtensions instead of hacky bespoke overlay implementation
2020-01-01 18:27:36 +00:00
adisbladis
589dd0617a
Fix nixpkgs-fmt
2020-01-01 18:01:11 +00:00
adisbladis
2c576409be
Add documentation output
2020-01-01 17:59:19 +00:00
adisbladis
4c24b3d49e
Add Nixdoc compatible docstrings
2020-01-01 17:49:12 +00:00
adisbladis
927ae249ef
Get license information from nixpkgs lib
2020-01-01 17:03:23 +00:00
adisbladis
c499f3b342
Change meta.licenses to meta meta.license
2020-01-01 16:44:56 +00:00
adisbladis
4acf604723
Add support for local path dependencies
2019-12-29 13:20:35 +00:00