-
Notifications
You must be signed in to change notification settings - Fork 234
Migrate project metadata from setup.py to pyproject.toml following PEP621 #1848
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
Changes from 9 commits
0c67c61
7cff590
cc9d8e0
033d369
f6bf6f6
796acf9
f6a0514
1155adc
f1015f5
6aa4888
cfc20a7
f85015e
f257a36
7553f0b
8fbf603
9d9ce07
2764315
5f54cc5
6ba0fe0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,10 @@ | ||
| """ | ||
|
||
| Build and install the project. | ||
| A simple setup.py script to support editable installs. | ||
| """ | ||
| from setuptools import find_packages, setup | ||
| # References: | ||
| # - https://github.com/pypa/setuptools/issues/2816 | ||
| # - https://setuptools.pypa.io/en/latest/userguide/quickstart.html#development-mode | ||
|
|
||
| NAME = "pygmt" | ||
| FULLNAME = "PyGMT" | ||
| AUTHOR = "The PyGMT Developers" | ||
| AUTHOR_EMAIL = "leouieda@gmail.com" | ||
| MAINTAINER = AUTHOR | ||
| MAINTAINER_EMAIL = AUTHOR_EMAIL | ||
| LICENSE = "BSD License" | ||
| URL = "https://github.com/GenericMappingTools/pygmt" | ||
| DESCRIPTION = "A Python interface for the Generic Mapping Tools" | ||
| KEYWORDS = "" | ||
| with open("README.rst", "r", encoding="utf8") as f: | ||
| LONG_DESCRIPTION = "".join(f.readlines()) | ||
| from setuptools import setup | ||
|
|
||
| PACKAGES = find_packages(exclude=["doc"]) | ||
| SCRIPTS = [] | ||
| PACKAGE_DATA = {"pygmt.tests": ["data/*", "baseline/*"]} | ||
weiji14 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| CLASSIFIERS = [ | ||
| "Development Status :: 4 - Beta", | ||
| "Intended Audience :: Science/Research", | ||
| "Intended Audience :: Developers", | ||
| "Intended Audience :: Education", | ||
| "Topic :: Scientific/Engineering", | ||
| "Topic :: Software Development :: Libraries", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| f"License :: OSI Approved :: {LICENSE}", | ||
| ] | ||
| PLATFORMS = "Any" | ||
| PYTHON_REQUIRES = ">=3.8" | ||
| INSTALL_REQUIRES = ["numpy>=1.20", "pandas", "xarray", "netCDF4", "packaging"] | ||
|
|
||
| if __name__ == "__main__": | ||
| setup( | ||
| name=NAME, | ||
| fullname=FULLNAME, | ||
| description=DESCRIPTION, | ||
| long_description=LONG_DESCRIPTION, | ||
| author=AUTHOR, | ||
| author_email=AUTHOR_EMAIL, | ||
| maintainer=MAINTAINER, | ||
| maintainer_email=MAINTAINER_EMAIL, | ||
| license=LICENSE, | ||
| url=URL, | ||
| platforms=PLATFORMS, | ||
| scripts=SCRIPTS, | ||
| packages=PACKAGES, | ||
| package_data=PACKAGE_DATA, | ||
| classifiers=CLASSIFIERS, | ||
| keywords=KEYWORDS, | ||
| python_requires=PYTHON_REQUIRES, | ||
| install_requires=INSTALL_REQUIRES, | ||
| ) | ||
| setup() | ||
seisman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that changes in this PR require setuptools>=61.
setuptools v61.0.0 was released on Mar. 24, 2022. This version starts to support storing project metadata in
pyproject.tomlfollowing PEP621 but it's still experimental and may change in future versions. I think we should not merge this PR unless thepyproject.tomlsupport is stable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's wait and see first. I've had to pin to setuptools=58.4.0 on one of my projects 3 weeks ago because one of the dependencies didn't like setuptools v60.9. There might be some other packages pinning to a lower setuptools version too.