Merge pull request #2096 from huggingface/pyproject_pdm
Remove setup.py, replace with pyproject.toml and pdm helperspull/2098/head
commit
155b32a1c2
|
@ -1,4 +1,62 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["pdm-backend"]
|
||||||
|
build-backend = "pdm.backend"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "timm"
|
||||||
|
authors = [
|
||||||
|
{name = "Ross Wightman", email = "ross@huggingface.co"},
|
||||||
|
]
|
||||||
|
description = "PyTorch Image Models"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.8"
|
||||||
|
keywords = ["pytorch", "image-classification"]
|
||||||
|
license = {text = "Apache-2.0"}
|
||||||
|
classifiers = [
|
||||||
|
'Development Status :: 4 - Beta',
|
||||||
|
'Intended Audience :: Education',
|
||||||
|
'Intended Audience :: Science/Research',
|
||||||
|
'License :: OSI Approved :: Apache Software License',
|
||||||
|
'Programming Language :: Python :: 3.8',
|
||||||
|
'Programming Language :: Python :: 3.9',
|
||||||
|
'Programming Language :: Python :: 3.10',
|
||||||
|
'Programming Language :: Python :: 3.11',
|
||||||
|
'Programming Language :: Python :: 3.12',
|
||||||
|
'Topic :: Scientific/Engineering',
|
||||||
|
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
||||||
|
'Topic :: Software Development',
|
||||||
|
'Topic :: Software Development :: Libraries',
|
||||||
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
'torch',
|
||||||
|
'torchvision',
|
||||||
|
'pyyaml',
|
||||||
|
'huggingface_hub',
|
||||||
|
'safetensors',
|
||||||
|
]
|
||||||
|
dynamic = ["version"]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
homepage = "https://github.com/huggingface/pytorch-image-models"
|
||||||
|
documentation = "https://huggingface.co/docs/timm/en/index"
|
||||||
|
repository = "https://github.com/huggingface/pytorch-image-models"
|
||||||
|
|
||||||
|
[tool.pdm.dev-dependencies]
|
||||||
|
test = [
|
||||||
|
'pytest',
|
||||||
|
'pytest-timeout',
|
||||||
|
'pytest-xdist',
|
||||||
|
'pytest-forked',
|
||||||
|
'expecttest',
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.pdm.version]
|
||||||
|
source = "file"
|
||||||
|
path = "timm/version.py"
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
|
testpaths = ['tests']
|
||||||
markers = [
|
markers = [
|
||||||
"base: marker for model tests using the basic setup",
|
"base: marker for model tests using the basic setup",
|
||||||
"cfg: marker for model tests checking the config",
|
"cfg: marker for model tests checking the config",
|
||||||
|
@ -7,8 +65,3 @@ markers = [
|
||||||
"fxforward: marker for model tests using torch fx (only forward)",
|
"fxforward: marker for model tests using torch fx (only forward)",
|
||||||
"fxbackward: marker for model tests using torch fx (only backward)",
|
"fxbackward: marker for model tests using torch fx (only backward)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.black]
|
|
||||||
line-length = 120
|
|
||||||
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
|
|
||||||
skip-string-normalization = true
|
|
||||||
|
|
|
@ -3,3 +3,7 @@
|
||||||
conda_name_differences = 'torch:pytorch'
|
conda_name_differences = 'torch:pytorch'
|
||||||
channels = pytorch
|
channels = pytorch
|
||||||
noarch = True
|
noarch = True
|
||||||
|
|
||||||
|
[metadata]
|
||||||
|
|
||||||
|
url = "https://github.com/huggingface/pytorch-image-models"
|
50
setup.py
50
setup.py
|
@ -1,50 +0,0 @@
|
||||||
""" Setup
|
|
||||||
"""
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
from codecs import open
|
|
||||||
from os import path
|
|
||||||
|
|
||||||
here = path.abspath(path.dirname(__file__))
|
|
||||||
|
|
||||||
# Get the long description from the README file
|
|
||||||
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
||||||
long_description = f.read()
|
|
||||||
|
|
||||||
exec(open('timm/version.py').read())
|
|
||||||
setup(
|
|
||||||
name='timm',
|
|
||||||
version=__version__,
|
|
||||||
description='PyTorch Image Models',
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type='text/markdown',
|
|
||||||
url='https://github.com/huggingface/pytorch-image-models',
|
|
||||||
author='Ross Wightman',
|
|
||||||
author_email='ross@huggingface.co',
|
|
||||||
classifiers=[
|
|
||||||
# How mature is this project? Common values are
|
|
||||||
# 3 - Alpha
|
|
||||||
# 4 - Beta
|
|
||||||
# 5 - Production/Stable
|
|
||||||
'Development Status :: 4 - Beta',
|
|
||||||
'Intended Audience :: Education',
|
|
||||||
'Intended Audience :: Science/Research',
|
|
||||||
'License :: OSI Approved :: Apache Software License',
|
|
||||||
'Programming Language :: Python :: 3.8',
|
|
||||||
'Programming Language :: Python :: 3.9',
|
|
||||||
'Programming Language :: Python :: 3.10',
|
|
||||||
'Programming Language :: Python :: 3.11',
|
|
||||||
'Topic :: Scientific/Engineering',
|
|
||||||
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
||||||
'Topic :: Software Development',
|
|
||||||
'Topic :: Software Development :: Libraries',
|
|
||||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
||||||
],
|
|
||||||
|
|
||||||
# Note that this is a string of words separated by whitespace, not a list.
|
|
||||||
keywords='pytorch pretrained models efficientnet mobilenetv3 mnasnet resnet vision transformer vit',
|
|
||||||
packages=find_packages(exclude=['convert', 'tests', 'results']),
|
|
||||||
include_package_data=True,
|
|
||||||
install_requires=['torch >= 1.7', 'torchvision', 'pyyaml', 'huggingface_hub', 'safetensors'],
|
|
||||||
python_requires='>=3.7',
|
|
||||||
)
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = '0.9.15dev0'
|
__version__ = '0.9.16dev0'
|
||||||
|
|
Loading…
Reference in New Issue