Skip to content

Commit d3e05c5

Browse files
Otto-AAboxed
authored andcommitted
switch from setup.py to uv
1 parent b6c8b6b commit d3e05c5

18 files changed

+733
-245
lines changed

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

CONTRIBUTING.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ Setup
66

77
First fork the repository and clone your fork.
88

9-
Install the dependencies:
9+
We use [uv](https://docs.astral.sh/uv/) to manage dependencies.
10+
All `uv` commands will implicitly install the required dependencies,
11+
however you can also explicitly install them with `uv sync`:
1012

1113
.. code-block:: console
1214
13-
pip install -r requirements.txt -r test_requirements.txt
15+
uv sync
1416
1517
Running the tests
1618
-----------------
1719

1820
.. code-block:: console
1921
20-
pytest
22+
uv run pytest
2123
2224
This also runs E2E tests that verify that `mutmut run` produces the same output as before. If your code changes should change the output of `mutmut run` and this test fails, try to delete the `snapshots/*.json` files (as described in the test errors).
2325

MANIFEST.in

Lines changed: 0 additions & 6 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 52 deletions
This file was deleted.

pyproject.toml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[project]
2+
name = "mutmut"
3+
version = "3.3.1"
4+
description = "mutation testing for Python 3"
5+
keyowrds = ["mutmut", "mutant", "mutation", "test", "testing"]
6+
authors = [
7+
{ name = "Anders Hovmöller", email = "[email protected]" },
8+
]
9+
requires-python = ">=3.10"
10+
readme = "README.rst"
11+
license = "BSD-3-Clause"
12+
license-files = ["LICENSE"]
13+
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: Developers",
17+
"Natural Language :: English",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
23+
"Programming Language :: Python :: 3.14",
24+
]
25+
26+
dependencies = [
27+
"click>=8.3.0",
28+
"coverage>=7.11.0",
29+
"libcst>=1.8.5",
30+
"pytest>=8.4.2",
31+
"setproctitle>=1.3.7",
32+
"textual>=6.4.0",
33+
"toml>=0.10.2 ; python_full_version < '3.11'",
34+
]
35+
36+
[project.urls]
37+
Homepage = "https://github.com/boxed/mutmut"
38+
Documentation = "https://mutmut.readthedocs.io/en/latest/"
39+
Repository = "https://github.com/boxed/mutmut"
40+
Issues = "https://github.com/boxed/mutmut/issues"
41+
Changelog = "https://github.com/boxed/mutmut/blob/main/HISTORY.rst"
42+
43+
44+
[project.scripts]
45+
mutmut = "mutmut.__main__:cli"
46+
47+
[build-system]
48+
requires = ["uv_build>=0.9.5,<0.10.0"]
49+
build-backend = "uv_build"
50+
51+
[tool.uv.build-backend]
52+
source-include = ["HISTORY.rst"]
53+
54+
[dependency-groups]
55+
dev = [
56+
"coverage>=7.11.0",
57+
"pytest>=8.4.2",
58+
"pytest-asyncio>=1.2.0",
59+
]
60+
61+
[tool.pytest.ini_options]
62+
testpaths = [
63+
"tests",
64+
]

requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 17 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 112 deletions
This file was deleted.

mutmut/__init__.py renamed to src/mutmut/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import importlib.metadata
12
from collections import defaultdict
23

3-
__version__ = '3.3.1'
4+
__version__ = importlib.metadata.version("mutmut")
45

56

67
duration_by_test = defaultdict(float)

mutmut/__main__.py renamed to src/mutmut/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ def load_config():
806806

807807

808808
@click.group()
809-
@click.version_option(mutmut.__version__)
809+
@click.version_option()
810810
def cli():
811811
pass
812812

0 commit comments

Comments
 (0)