Skip to content

Commit 3086a24

Browse files
build: move to traditional setuptool backend
1 parent 2934d38 commit 3086a24

5 files changed

Lines changed: 58 additions & 24 deletions

File tree

pyproject.toml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
11
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
4-
5-
[project]
6-
name = "my_torch_analyzer"
7-
version = "0.0.1"
8-
description = "A clash of kings"
9-
license = { text = "BSD-3-Clause" }
10-
requires-python = ">=3.12"
11-
dependencies = [
12-
"matplotlib"
13-
]
14-
15-
[project.scripts]
16-
my_torch_analyzer = "src.main:main"
17-
18-
[project.optional-dependencies]
19-
dev = [
20-
"black",
21-
"isort"
22-
]
23-
24-
[tool.hatch.build.targets.wheel]
25-
packages = ["src"]
2+
requires = ["setuptools>=42.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
264

275
[tool.black]
286
line-length = 79
@@ -34,3 +12,17 @@ line_length = 79
3412
known_first_party = ["src"]
3513
multi_line_output = 3
3614
include_trailing_comma = true
15+
16+
[tool.mypy]
17+
mypy_path = "src"
18+
check_untyped_defs = true
19+
disallow_any_generics = true
20+
ignore_missing_imports = true
21+
no_implicit_optional = true
22+
show_error_codes = true
23+
strict_equality = true
24+
warn_redundant_casts = true
25+
warn_return_any = true
26+
warn_unreachable = true
27+
warn_unused_configs = true
28+
no_implicit_reexport = true

setup.cfg

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[metadata]
2+
name = my_torch_analyzer
3+
version = 0.0.1
4+
description = A clash of kings
5+
license = BSD-3-Clause
6+
7+
[options]
8+
include_package_data = True
9+
python_requires = >=3.8
10+
packages = my_torch
11+
package_dir =
12+
=src
13+
zip_safe = no
14+
install_requires =
15+
matplotlib
16+
17+
[options.packages.find]
18+
where = src
19+
20+
[options.entry_points]
21+
console_scripts =
22+
my_torch_analyzer = my_torch.main:main
23+
24+
[options.extras_require]
25+
dev =
26+
black
27+
isort
28+
29+
[tool:black]
30+
line-length = 79
31+
target-version = py312
32+
33+
[tool:isort]
34+
profile = black
35+
line_length = 79
36+
known_first_party = src
37+
multi_line_output = 3
38+
include_trailing_comma = true

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from setuptools import setup
2+
3+
if __name__ == "__main__":
4+
setup()
File renamed without changes.

0 commit comments

Comments
 (0)