-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from mwtoews/pyproject-toml
Move static project metadata to pyproject.toml
- Loading branch information
Showing
6 changed files
with
69 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build/ | ||
*.pyc | ||
dist/ | ||
*.egg-info/ | ||
src/pygrib/_pygrib.c | ||
src/pygrib/*.so | ||
test/out.grib | ||
venv/ | ||
.eggs/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,55 @@ | ||
[build-system] | ||
# minimum requiremets for build system | ||
requires = ["setuptools", "cython", "numpy", "wheel"] | ||
requires = [ | ||
"Cython>=0.29", | ||
"oldest-supported-numpy", | ||
"setuptools>=61", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "pygrib" | ||
description = "Python module for reading/writing GRIB files" | ||
readme = "README.md" | ||
authors = [ | ||
{name = "Jeff Whitaker", email = "[email protected]"}, | ||
] | ||
requires-python = ">=3.7" | ||
license = {text = "MIT"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python :: 3", | ||
"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", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"pyproj", | ||
"numpy", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Documentation = "https://jswhit.github.io/pygrib/" | ||
Repository = "https://github.com/jswhit/pygrib" | ||
|
||
[tool.check-manifest] | ||
ignore = [ | ||
".gitignore", | ||
"src/pygrib/*.c", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["test"] | ||
doctest_optionflags = ["NORMALIZE_WHITESPACE ELLIPSIS"] | ||
|
||
[tool.setuptools] | ||
include-package-data = false | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import os, sys | ||
import glob | ||
import os | ||
import setuptools | ||
import sys | ||
from Cython.Distutils import build_ext | ||
|
||
|
||
|
@@ -97,11 +98,6 @@ def package_files(directory): | |
) | ||
] | ||
|
||
# Import README.md as PyPi long_description | ||
this_directory = os.path.abspath(os.path.dirname(__file__)) | ||
with open(os.path.join(this_directory, "README.md")) as f: | ||
long_description = f.read() | ||
|
||
# man pages installed in MAN_DIR/man1 | ||
if os.environ.get("MAN_DIR"): | ||
man_dir = os.environ.get("MAN_DIR") | ||
|
@@ -111,31 +107,11 @@ def package_files(directory): | |
else: | ||
data_files = None | ||
|
||
# See pyproject.toml for project metadata | ||
setuptools.setup( | ||
name="pygrib", | ||
name="pygrib", # need by GitHub dependency graph | ||
version=extract_version("src/pygrib/_pygrib.pyx"), | ||
description="Python module for reading/writing GRIB files", | ||
author="Jeff Whitaker", | ||
author_email="[email protected]", | ||
url="https://github.com/jswhit/pygrib", | ||
download_url="http://python.org/pypi/pygrib", | ||
license="License :: OSI Approved :: MIT License", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
cmdclass=cmdclass, | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
scripts=[ | ||
"utils/grib_list", | ||
"utils/grib_repack", | ||
|
@@ -144,13 +120,5 @@ def package_files(directory): | |
], | ||
ext_modules=ext_modules, | ||
data_files=data_files, | ||
packages=["pygrib"], | ||
package_dir={'':'src'}, | ||
package_data=package_data, | ||
setup_requires=["setuptools", "cython"], | ||
install_requires=[ | ||
"pyproj", | ||
"setuptools", | ||
"numpy", | ||
], | ||
) |