Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully migrate to pyproject.toml #500

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ register-python-argcomplete = "argcomplete.scripts.register_python_argcomplete:m
test = ["coverage", "pexpect", "wheel", "ruff", "mypy"]

[project.urls]
"Homepage" = "https://github.com/kislyuk/argcomplete"
"Documentation"= "https://kislyuk.github.io/argcomplete"
"Source Code"= "https://github.com/kislyuk/argcomplete"
"Issue Tracker"= "https://github.com/kislyuk/argcomplete/issues"
"Change Log"= "https://github.com/kislyuk/argcomplete/blob/master/Changes.rst"

[tool.setuptools]
platforms=["MacOS X", "Posix"]

[tool.setuptools.packages.find]
exclude = ["contrib"]

[tool.setuptools_scm]

[tool.black]
Expand Down
13 changes: 2 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#!/usr/bin/env python

import glob
from setuptools import setup

from setuptools import find_packages, setup

setup(
url="https://github.com/kislyuk/argcomplete",
packages=find_packages(exclude=["test", "test.*"]),
package_data={"argcomplete": ["bash_completion.d/_python-argcomplete", "py.typed"]},
Copy link
Owner

Choose a reason for hiding this comment

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

It looks like package_data is not migrated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You don't need it due to setuptools_scm AFAIK.

Copy link
Owner

Choose a reason for hiding this comment

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

That doesn't make any sense. setuptools_scm manages the version, package_data manages including non-Python files in the distribution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It also includes a hook for include_package_data, which is enabled by default in pyproject.toml projects, which includes all files tracked by Git unless otherwise excluded.

zip_safe=False,
include_package_data=True,
platforms=["MacOS X", "Posix"],
)
setup()
Loading