Skip to content

Commit 155b32a

Browse files
authored
Merge pull request #2096 from huggingface/pyproject_pdm
Remove setup.py, replace with pyproject.toml and pdm helpers
2 parents 8a713b0 + 35d6eef commit 155b32a

File tree

4 files changed

+64
-57
lines changed

4 files changed

+64
-57
lines changed

pyproject.toml

+59-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,67 @@
1+
[build-system]
2+
requires = ["pdm-backend"]
3+
build-backend = "pdm.backend"
4+
5+
[project]
6+
name = "timm"
7+
authors = [
8+
{name = "Ross Wightman", email = "[email protected]"},
9+
]
10+
description = "PyTorch Image Models"
11+
readme = "README.md"
12+
requires-python = ">=3.8"
13+
keywords = ["pytorch", "image-classification"]
14+
license = {text = "Apache-2.0"}
15+
classifiers = [
16+
'Development Status :: 4 - Beta',
17+
'Intended Audience :: Education',
18+
'Intended Audience :: Science/Research',
19+
'License :: OSI Approved :: Apache Software License',
20+
'Programming Language :: Python :: 3.8',
21+
'Programming Language :: Python :: 3.9',
22+
'Programming Language :: Python :: 3.10',
23+
'Programming Language :: Python :: 3.11',
24+
'Programming Language :: Python :: 3.12',
25+
'Topic :: Scientific/Engineering',
26+
'Topic :: Scientific/Engineering :: Artificial Intelligence',
27+
'Topic :: Software Development',
28+
'Topic :: Software Development :: Libraries',
29+
'Topic :: Software Development :: Libraries :: Python Modules',
30+
]
31+
dependencies = [
32+
'torch',
33+
'torchvision',
34+
'pyyaml',
35+
'huggingface_hub',
36+
'safetensors',
37+
]
38+
dynamic = ["version"]
39+
40+
[project.urls]
41+
homepage = "https://github.com/huggingface/pytorch-image-models"
42+
documentation = "https://huggingface.co/docs/timm/en/index"
43+
repository = "https://github.com/huggingface/pytorch-image-models"
44+
45+
[tool.pdm.dev-dependencies]
46+
test = [
47+
'pytest',
48+
'pytest-timeout',
49+
'pytest-xdist',
50+
'pytest-forked',
51+
'expecttest',
52+
]
53+
54+
[tool.pdm.version]
55+
source = "file"
56+
path = "timm/version.py"
57+
158
[tool.pytest.ini_options]
59+
testpaths = ['tests']
260
markers = [
361
"base: marker for model tests using the basic setup",
462
"cfg: marker for model tests checking the config",
563
"torchscript: marker for model tests using torchscript",
664
"features: marker for model tests checking feature extraction",
765
"fxforward: marker for model tests using torch fx (only forward)",
866
"fxbackward: marker for model tests using torch fx (only backward)",
9-
]
10-
11-
[tool.black]
12-
line-length = 120
13-
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
14-
skip-string-normalization = true
67+
]

setup.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
conda_name_differences = 'torch:pytorch'
44
channels = pytorch
55
noarch = True
6+
7+
[metadata]
8+
9+
url = "https://github.com/huggingface/pytorch-image-models"

setup.py

-50
This file was deleted.

timm/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.9.15dev0'
1+
__version__ = '0.9.16dev0'

0 commit comments

Comments
 (0)