Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
# Package ######################################################################

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "transformers"
description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow"
readme = "README.md"
requires-python = ">= 3.7"
authors = [
{ name = "The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)", email = "transformers@huggingface.co" },
]
license = { text = "Apache 2.0 License" }
keywords = [
"NLP",
"vision",
"speech",
"deep learning",
"transformer",
"pytorch",
"tensorflow",
"jax",
"BERT",
"GPT-2",
"Wav2Vec2",
"ViT",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dynamic = ["dependencies", "optional-dependencies", "version"]

[project.scripts]
transformers-cli = "transformers.commands.transformers_cli:main"

[project.urls]
Homepage = "https://huggingface.co"
Repository = "https://github.com/huggingface/transformers"
Documentation = "https://huggingface.co/docs/transformers"
"Bug Report" = "https://github.com/huggingface/transformers/issues"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
transformers = ["*.cu", "*.cpp", "*.cuh", "*.h", "*.pyx"]

# Linter tools #################################################################

[tool.black]
line-length = 119
target-version = ['py37']
Expand All @@ -17,3 +82,6 @@ line-length = 119
[tool.ruff.isort]
lines-after-imports = 2
known-first-party = ["transformers"]

[tool.pytest]
doctest_optionflags="NUMBER NORMALIZE_WHITESPACE ELLIPSIS"
17 changes: 0 additions & 17 deletions setup.cfg

This file was deleted.

29 changes: 0 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,36 +426,7 @@ def run(self):
setup(
name="transformers",
version="4.28.0.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
author="The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)",
author_email="transformers@huggingface.co",
description="State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow",
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
Comment on lines -431 to -432

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are losing those apparently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It goes to project.readme in pyproject.toml. The content type will be inferred from the extension (.md or .rst).

keywords="NLP vision speech deep learning transformer pytorch tensorflow jax BERT GPT-2 Wav2Vec2 ViT",
license="Apache 2.0 License",
url="https://github.com/huggingface/transformers",
package_dir={"": "src"},
packages=find_packages("src"),
include_package_data=True,
package_data={"transformers": ["*.cu", "*.cpp", "*.cuh", "*.h", "*.pyx"]},
zip_safe=False,
extras_require=extras,
entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
python_requires=">=3.7.0",
install_requires=install_requires,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
cmdclass={"deps_table_update": DepsTableUpdateCommand},
)