nox-uv 0.1.0__py3-none-any.whl → 0.1.1.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nox_uv/__init__.py +12 -9
- {nox_uv-0.1.0.dist-info → nox_uv-0.1.1.dev0.dist-info}/METADATA +7 -3
- nox_uv-0.1.1.dev0.dist-info/RECORD +6 -0
- nox_uv-0.1.0.dist-info/RECORD +0 -6
- {nox_uv-0.1.0.dist-info → nox_uv-0.1.1.dev0.dist-info}/WHEEL +0 -0
- {nox_uv-0.1.0.dist-info → nox_uv-0.1.1.dev0.dist-info}/licenses/LICENSE.txt +0 -0
nox_uv/__init__.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from collections.abc import Sequence
|
|
3
|
+
from collections.abc import Callable, Sequence
|
|
4
4
|
import functools
|
|
5
|
-
from typing import Any,
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
6
|
|
|
7
7
|
import nox
|
|
8
8
|
|
|
@@ -25,16 +25,14 @@ def session(
|
|
|
25
25
|
uv_extras: Sequence[str] = (),
|
|
26
26
|
uv_all_extras: bool = False,
|
|
27
27
|
uv_all_groups: bool = False,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Use this decorator instead of ``@nox.session``. Session functions are passed
|
|
32
|
-
:class:`Session` instead of :class:`nox.sessions.Session`; otherwise, the
|
|
33
|
-
decorators work exactly the same.
|
|
28
|
+
**kwargs: dict[str, Any],
|
|
29
|
+
) -> Callable[..., Callable[..., R]]:
|
|
30
|
+
"""Drop-in replacement for the :func:`nox.session` decorator to add support for `uv`.
|
|
34
31
|
|
|
35
32
|
Args:
|
|
36
33
|
args: Positional arguments are forwarded to ``nox.session``.
|
|
37
|
-
kwargs: Keyword arguments are forwarded to ``nox.session``.
|
|
34
|
+
kwargs: Keyword arguments are forwarded to ``nox.session``. Used to catch any future
|
|
35
|
+
arguments of nox.session that aren't explicitely captured in nox_uv.session.
|
|
38
36
|
|
|
39
37
|
Returns:
|
|
40
38
|
The decorated session function.
|
|
@@ -54,10 +52,14 @@ def session(
|
|
|
54
52
|
uv_extras=uv_extras,
|
|
55
53
|
uv_all_extras=uv_all_extras,
|
|
56
54
|
uv_all_groups=uv_all_groups,
|
|
55
|
+
**kwargs,
|
|
57
56
|
) # type: ignore
|
|
58
57
|
|
|
59
58
|
[function] = args
|
|
60
59
|
|
|
60
|
+
if venv_backend is None:
|
|
61
|
+
venv_backend = nox.options.default_venv_backend
|
|
62
|
+
|
|
61
63
|
is_uv = venv_backend == "uv"
|
|
62
64
|
|
|
63
65
|
# Create the `uv sync` command
|
|
@@ -103,4 +105,5 @@ def session(
|
|
|
103
105
|
tags=tags,
|
|
104
106
|
default=default,
|
|
105
107
|
requires=requires,
|
|
108
|
+
**kwargs,
|
|
106
109
|
)
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nox-uv
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1.dev0
|
|
4
4
|
Summary: Facilitate nox integration with uv for Python projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/dantebben/nox-uv
|
|
6
6
|
Author-email: Dan Tebben <dantebben@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
License-File: LICENSE.txt
|
|
9
|
-
Requires-Python:
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
10
|
Requires-Dist: nox>=2025.2.9
|
|
11
|
+
Provides-Extra: doc
|
|
12
|
+
Requires-Dist: mkdocs; extra == 'doc'
|
|
13
|
+
Provides-Extra: plot
|
|
14
|
+
Requires-Dist: plotly; extra == 'plot'
|
|
11
15
|
Description-Content-Type: text/markdown
|
|
12
16
|
|
|
13
17
|
## Intro
|
|
@@ -20,7 +24,7 @@ with the [uv](https://docs.astral.sh/uv/) package manager.
|
|
|
20
24
|
|
|
21
25
|
To use, import `session` from `nox-uv` in your `nox-file`.
|
|
22
26
|
|
|
23
|
-
**NOTE**: All `@session(...)` parameters are
|
|
27
|
+
**NOTE**: All `@session(...)` parameters are keywords only, no positional parameters are allowed.
|
|
24
28
|
|
|
25
29
|
**NOTE**: The `default_groups` defined in `pyproject.toml` are _not_ installed by default. The
|
|
26
30
|
user must explicitly list the desired groups in the `uv_groups` parameter.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
nox_uv/__init__.py,sha256=mvMB1ct23RsbfSbcHucPpGIEZkyA8KaE9xPG-VbUlJk,3072
|
|
2
|
+
nox_uv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
nox_uv-0.1.1.dev0.dist-info/METADATA,sha256=3C2eaTInFiHhP_maTwzGqo1T2prQ6Ds8lniSNzyv97M,1333
|
|
4
|
+
nox_uv-0.1.1.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
+
nox_uv-0.1.1.dev0.dist-info/licenses/LICENSE.txt,sha256=iTZ5ALF1isnM6Ey9Tjom0XIGBBysArB0I2NHZ9a-b8I,1067
|
|
6
|
+
nox_uv-0.1.1.dev0.dist-info/RECORD,,
|
nox_uv-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
nox_uv/__init__.py,sha256=z--lgqfIK0Gct163ynH9As7uRbcYNimDWiRUzJ4nljQ,2961
|
|
2
|
-
nox_uv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
nox_uv-0.1.0.dist-info/METADATA,sha256=cB7mMOq9UKdTh1yYgv0cvcwYYTQFADDKGE-ZF84b9ag,1214
|
|
4
|
-
nox_uv-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
-
nox_uv-0.1.0.dist-info/licenses/LICENSE.txt,sha256=iTZ5ALF1isnM6Ey9Tjom0XIGBBysArB0I2NHZ9a-b8I,1067
|
|
6
|
-
nox_uv-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|