Skip to content

Commit af0ac0e

Browse files
committed
Add rye.
1 parent 9fe1dce commit af0ac0e

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

.python-version

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

pyproject.toml

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "pytask_latex"
@@ -10,13 +10,17 @@ classifiers = [
1010
"License :: OSI Approved :: MIT License",
1111
"Operating System :: OS Independent",
1212
"Programming Language :: Python :: 3",
13-
"Programming Language :: Python :: 3 :: Only"
13+
"Programming Language :: Python :: 3 :: Only",
1414
]
1515
requires-python = ">=3.8"
16-
dependencies = [ "latex-dependency-scanner>=0.1.1", "pluggy>=1.0.0", "pytask>=0.4.0"]
17-
dynamic = [ "version" ]
18-
authors = [ { name = "Tobias Raabe", email = "[email protected]"} ]
19-
readme = { file = "README.md", content-type = "text/markdown"}
16+
dependencies = [
17+
"latex-dependency-scanner>=0.1.1",
18+
"pluggy>=1.0.0",
19+
"pytask>=0.4.0",
20+
]
21+
dynamic = ["version"]
22+
authors = [{ name = "Tobias Raabe", email = "[email protected]" }]
23+
readme = { file = "README.md", content-type = "text/markdown" }
2024
license = { text = "MIT" }
2125

2226
[project.urls]
@@ -29,27 +33,28 @@ Tracker = "https://github.com/pytask-dev/pytask-latex/issues"
2933
[project.optional-dependencies]
3034
test = ["pytest", "pytest-cov", "pytest-xdist"]
3135

32-
[tool.setuptools]
33-
include-package-data = true
34-
zip-safe = false
35-
platforms = [ "any",]
36-
license-files = [ "LICENSE" ]
37-
38-
[tool.check-manifest]
39-
ignore = ["src/pytask_latex/_version.py"]
40-
4136
[project.entry-points.pytask]
4237
pytask_latex = "pytask_latex.plugin"
4338

44-
[tool.setuptools.package-dir]
45-
"" = "src"
39+
[tool.rye]
40+
managed = true
41+
42+
[tool.hatch.build.hooks.vcs]
43+
version-file = "src/pytask_latex/_version.py"
44+
45+
[tool.hatch.build.targets.sdist]
46+
exclude = ["tests"]
47+
only-packages = true
48+
49+
[tool.hatch.build.targets.wheel]
50+
exclude = ["tests"]
51+
only-packages = true
4652

47-
[tool.setuptools.packages.find]
48-
where = [ "src" ]
49-
namespaces = false
53+
[tool.hatch.version]
54+
source = "vcs"
5055

51-
[tool.setuptools_scm]
52-
write_to = "src/pytask_latex/_version.py"
56+
[tool.hatch.metadata]
57+
allow-direct-references = true
5358

5459
[tool.mypy]
5560
files = ["src", "tests"]
@@ -73,9 +78,9 @@ unsafe-fixes = true
7378

7479
[tool.ruff.lint]
7580
extend-ignore = [
76-
"ANN401", # Allow typing.Any.
77-
"COM812", # Comply with ruff-format
78-
"ISC001", # Comply with ruff-format
81+
"ANN401", # Allow typing.Any.
82+
"COM812", # Comply with ruff-format
83+
"ISC001", # Comply with ruff-format
7984
]
8085
select = ["ALL"]
8186

@@ -89,7 +94,6 @@ force-single-line = true
8994
convention = "numpy"
9095

9196
[tool.pytest.ini_options]
92-
# Do not add src since it messes with the loading of pytask-parallel as a plugin.
9397
testpaths = ["src", "tests"]
9498
markers = [
9599
"wip: Tests that are work-in-progress.",

0 commit comments

Comments
 (0)