Skip to content

Commit c832561

Browse files
committed
move all metadata to pyproject.toml
1 parent 3d4a87e commit c832561

4 files changed

Lines changed: 100 additions & 56 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ repos:
2323
hooks:
2424
- id: pyproject-fmt
2525

26+
27+
- repo: https://github.com/charliermarsh/ruff-pre-commit
28+
rev: v0.0.260
29+
hooks:
30+
- id: ruff
31+
2632
ci:
2733
autofix_commit_msg: |
2834
[pre-commit.ci] auto fixes from pre-commit.com hooks

pyproject.toml

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,96 @@
11
[build-system]
2-
requires = ["pip>9.0.1", "setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "oldest-supported-numpy", "build"]
32
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"build",
5+
"oldest-supported-numpy",
6+
"pip>9.0.1",
7+
"setuptools>=42",
8+
"setuptools_scm[toml]>=3.4",
9+
"wheel",
10+
]
11+
12+
[project]
13+
name = "gsw"
14+
description = "Gibbs Seawater Oceanographic Package of TEOS-10"
15+
license = {text = "BSD-3-Clause"}
16+
authors = [
17+
{name = "Eric Firing, Filipe Fernandes", email = "efiring@hawaii.edu"},
18+
]
19+
requires-python = ">=3.8"
20+
classifiers = [
21+
"Development Status :: 5 - Production/Stable",
22+
"Intended Audience :: Science/Research",
23+
"Operating System :: OS Independent",
24+
"License :: OSI Approved :: BSD License",
25+
"Programming Language :: Python",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Topic :: Scientific/Engineering",
32+
]
33+
dynamic = [
34+
"readme",
35+
"version",
36+
]
37+
[project.urls]
38+
documentation = "https://teos-10.github.io/GSW-Python/"
39+
homepage = "https://www.teos-10.org/"
40+
repository = "https://github.com/TEOS-10/GSW-python"
41+
42+
[tool.setuptools]
43+
license-files = ["LICENSE.txt"]
44+
zip-safe = false
45+
include-package-data = true
46+
47+
[tool.setuptools.packages.find]
48+
where = ["gsw"]
49+
50+
[tool.setuptools.dynamic]
51+
dependencies = {file = ["requirements.txt"]}
52+
readme = {file = "README.md", content-type = "text/markdown"}
53+
54+
[tool.setuptools_scm]
55+
write_to = "gsw/_version.py"
56+
write_to_template = "__version__ = '{version}'"
57+
58+
[tool.check-manifest]
59+
ignore = [
60+
"*.yml",
61+
".coveragerc",
62+
"docs",
63+
"docs/*",
64+
"*.enc",
65+
"tools",
66+
"tools/*",
67+
"gsw/_version.py",
68+
]
69+
70+
[tool.ruff]
71+
select = [
72+
"A", # flake8-builtins
73+
"B", # flake8-bugbear
74+
"C4", # flake8-comprehensions
75+
"F", # flakes
76+
"I", # import sorting
77+
# "T20", # flake8-print
78+
"UP", # upgrade
79+
]
80+
target-version = "py38"
81+
line-length = 105
82+
83+
ignore = [
84+
"F401",
85+
"E501",
86+
"E713",
87+
]
88+
89+
exclude = [
90+
"tools",
91+
]
92+
93+
[tool.ruff.per-file-ignores]
94+
"docs/source/conf.py" = [
95+
"A001",
96+
]

setup.cfg

Lines changed: 0 additions & 47 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ def build_extensions(self):
5050
]
5151

5252
config = {
53-
# The package metadata is specified in setup.cfg but GitHub's downstream dependency graph
54-
# does not work unless we put the name this here too.
55-
"name": "gsw",
56-
"use_scm_version": {
57-
"write_to": "gsw/_version.py",
58-
"write_to_template": '__version__ = "{version}"',
59-
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
60-
},
6153
"ext_modules": [Extension("gsw._gsw_ufuncs", ufunc_src_list)],
6254
"include_dirs": [os.path.join(rootpath, "src", "c_gsw")],
6355
"cmdclass": {"build_ext": build_ext},

0 commit comments

Comments
 (0)