Skip to content

Commit 354278d

Browse files
committed
prepping data for pyproject.toml
1 parent c9e25c7 commit 354278d

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

packages/basemap_data/build.py

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import itertools
2+
3+
4+
def get_data_files():
5+
# Define some helper lists
6+
basenames = [
7+
"countries",
8+
"countriesmeta",
9+
"gshhs",
10+
"gshhsmeta",
11+
"rivers",
12+
"riversmeta",
13+
"states",
14+
"statesmeta",
15+
]
16+
resolutions = ["c", "l", "i", "h", "f"]
17+
grids = ["1.25", "2.5", "5", "10"]
18+
19+
# Define data assets
20+
data_dat_files = [
21+
f"{basename}_{res}.dat"
22+
for basename, res in itertools.product(basenames, resolutions[:3])
23+
]
24+
data_bin_files = [
25+
f"lsmask_{grid}min_{res}.bin"
26+
for grid, res in itertools.product(grids, resolutions)
27+
]
28+
data_usc_files = [f"UScounties.{ext}" for ext in ("dbf", "prj", "shp", "shx")]
29+
data_other_files = ["epsg", "bmng.jpg", "etopo1.jpg", "shadedrelief.jpg"]
30+
31+
return data_dat_files + data_bin_files + data_usc_files + data_other_files

packages/basemap_data/pyproject.toml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel"
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
[project]
9+
name = "basemap_data"
10+
version = "1.3.2"
11+
description = "Data assets for matplotlib basemap"
12+
readme = "README.md"
13+
requires-python = ">=3.9" # Updated to match main package
14+
license = {text = "GNU Lesser General Public License v3 or later (LGPLv3+)"}
15+
authors = [
16+
{name = "Jeff Whitaker", email = "[email protected]"}
17+
]
18+
maintainers = [
19+
{name = "Víctor Molina García", email = "[email protected]"}
20+
]
21+
keywords = ["GIS", "maps", "plots"]
22+
classifiers = [
23+
"Development Status :: 5 - Production/Stable",
24+
"Intended Audience :: Education",
25+
"Intended Audience :: Science/Research",
26+
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
27+
"Operating System :: OS Independent",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Topic :: Scientific/Engineering :: Visualization",
34+
"Topic :: Software Development :: Libraries :: Python Modules"
35+
]
36+
37+
[project.urls]
38+
Homepage = "https://matplotlib.org/basemap"
39+
Documentation = "https://matplotlib.org/basemap/"
40+
Repository = "https://github.com/matplotlib/basemap"
41+
"Bug Tracker" = "https://github.com/matplotlib/basemap/issues"
42+
43+
[tool.setuptools]
44+
packages = ["mpl_toolkits.basemap_data"]
45+
package-dir = {"" = "src"}
46+
license-files = [
47+
"COPYING",
48+
"COPYING.LESSER",
49+
"LICENSE.epsg",
50+
"LICENSE.mit"
51+
]
52+
53+
[tool.setuptools.package-data]
54+
"mpl_toolkits.basemap_data" = [
55+
# This will be populated from build.py
56+
"data/*"
57+
]
58+
59+
[tool.setuptools.sdist]
60+
formats = ["zip"]
61+
62+
[tool.setuptools.bdist-wheel]
63+
universal = true

0 commit comments

Comments
 (0)