Skip to content

Commit

Permalink
Migrate setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaochao Dong (@damnever) <[email protected]>
  • Loading branch information
damnever committed Feb 17, 2024
1 parent bbfb409 commit 87caae7
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
github: damnever
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
ko_fi: damnever
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ count.py
/build/
/dist/
.venv*
venv*
2 changes: 1 addition & 1 deletion pigar/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_generate(self):
'gen', '--with-referenced-comments',
'--dont-show-differences', '--exclude-glob',
'**/tests/data/*', '--exclude-glob',
'**/_vendor/pip/_vendor/*', '-f',
'**/_vendor/pip/*', '-f',
generated_requirement_file, project_path
]
)
Expand Down
49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[project]
name = "pigar"
authors = [{ name = "damnever", email = "[email protected]" }]
description = "A tool to generate requirements.txt for Python project."
readme = "README.md"
keywords = ["requirements.txt", "automation", "tool", "module-search"]
license = { text = "BSD 3-Clause License" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Utilities",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"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",
]
requires-python = ">=3.7"
dependencies = ["click>=8.1", "nbformat>=5.7", "aiohttp>=3.9"]
dynamic = ["version", "entry-points"]

[project.scripts]
pigar = "pigar.__main__:main"

[project.urls]
Documentation = "https://github.com/damnever/pigar"
Source = "https://github.com/damnever/pigar"

[build-system]
# The lower bound is for <https://github.com/pypa/setuptools/issues/3865>.
requires = ["setuptools>=67.6.1", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
package-dir = { "" = "pigar" }
include-package-data = true
license-files = ["LICENSE", "pigar/_vendor/pip/LICENSE.txt"]

[tool.setuptools.packages.find]
where = ["pigar"]
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"]

[tool.setuptools.dynamic]
version = { attr = "pigar.version.__version__" }
entry-points = { file = "pigar.version.__version__" }
77 changes: 0 additions & 77 deletions setup.py

This file was deleted.

0 comments on commit 87caae7

Please sign in to comment.