nox-uv 0.2.1__py3-none-any.whl → 0.2.3__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 CHANGED
@@ -2,13 +2,13 @@ from __future__ import annotations
2
2
 
3
3
  from collections.abc import Callable, Sequence
4
4
  import functools
5
- from typing import Any, TypeVar
5
+ from typing import Any, TypeVar, Union
6
6
 
7
7
  import nox
8
8
 
9
9
  R = TypeVar("R")
10
10
 
11
- Python = Sequence[str] | str | bool | None
11
+ Python = Union[Sequence[str], str, bool]
12
12
 
13
13
 
14
14
  def session(
@@ -77,17 +77,17 @@ def session(
77
77
  @functools.wraps(function)
78
78
  def wrapper(s: nox.Session, *_args: Any, **_kwargs: Any) -> None:
79
79
  if s.venv_backend == "uv":
80
- env: dict[str, Any] = {"UV_PROJECT_ENVIRONMENT": s.virtualenv.location}
80
+ s.env["UV_PROJECT_ENVIRONMENT"] = s.virtualenv.location
81
81
 
82
82
  # UV called from Nox does not respect the Python version set in the Nox session.
83
83
  # We need to pass the Python version to UV explicitly.
84
84
  if s.python is not None:
85
- env["UV_PYTHON"] = s.python
85
+ # NOTE: casting to string explicitly because implicit casting isn't working
86
+ # for the type checker.
87
+ s.env["UV_PYTHON"] = str(s.python)
88
+
89
+ s.run_install(*sync_cmd)
86
90
 
87
- s.run_install(
88
- *sync_cmd,
89
- env=env,
90
- )
91
91
  function(nox.Session(s._runner), *_args, **_kwargs)
92
92
 
93
93
  return nox.session( # type: ignore
@@ -1,28 +1,38 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nox-uv
3
- Version: 0.2.1
3
+ Version: 0.2.3
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: >=3.10
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Testing
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.9
10
23
  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'
24
+ Provides-Extra: pyyaml
25
+ Requires-Dist: pyyaml; extra == 'pyyaml'
26
+ Provides-Extra: scapy
27
+ Requires-Dist: scapy; extra == 'scapy'
15
28
  Description-Content-Type: text/markdown
16
29
 
17
30
  ## Intro
18
31
 
19
- This is heavliy influcenced by, but much more limited than,
20
- [nox-poetry](https://nox-poetry.readthedocs.io).
21
-
22
32
  This is a basic drop-in replacement for `nox.session` of [nox](https://nox.thea.codes/) to be used
23
33
  with the [uv](https://docs.astral.sh/uv/) package manager.
24
34
 
25
- To use, import `session` from `nox-uv` in your `nox-file`.
35
+ To use, import `session` from `nox-uv` in your `noxfile.py`.
26
36
 
27
37
  **NOTE**: All `@session(...)` parameters are keywords only, no positional parameters are allowed.
28
38
 
@@ -36,3 +46,7 @@ user must explicitly list the desired groups in the `uv_groups` parameter.
36
46
  - `uv_all_extras`: boolean to install all extras from `pyproject.toml`
37
47
  - `uv_all_groups`: boolean to install all dependency groups
38
48
 
49
+ ## Inspiration
50
+
51
+ This is heavliy influcenced by, but much more limited than,
52
+ [nox-poetry](https://nox-poetry.readthedocs.io).
@@ -0,0 +1,6 @@
1
+ nox_uv/__init__.py,sha256=r5KNgONE17jPy66T_MK6caqw5pkNYCHTgxWdcM3NuPQ,3054
2
+ nox_uv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ nox_uv-0.2.3.dist-info/METADATA,sha256=2YjF8ZHvRj3MXQowiZbuBecvxcGuRufU56LAlbdtlC8,1962
4
+ nox_uv-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ nox_uv-0.2.3.dist-info/licenses/LICENSE.txt,sha256=iTZ5ALF1isnM6Ey9Tjom0XIGBBysArB0I2NHZ9a-b8I,1067
6
+ nox_uv-0.2.3.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- nox_uv/__init__.py,sha256=xtMQ4CI42DOkUvBZCvvl4brjXQlsZD9bB9aT2mYFPm0,2981
2
- nox_uv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- nox_uv-0.2.1.dist-info/METADATA,sha256=GomceP_IRCri0hrkxlDKhTDLqVxE-ZLSVVlLTXpyu9M,1328
4
- nox_uv-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- nox_uv-0.2.1.dist-info/licenses/LICENSE.txt,sha256=iTZ5ALF1isnM6Ey9Tjom0XIGBBysArB0I2NHZ9a-b8I,1067
6
- nox_uv-0.2.1.dist-info/RECORD,,
File without changes