1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# flake8: noqa: E122
"""basemap_data_hires -- High-resolution data assets for matplotlib basemap."""
import io
import os
import itertools
from setuptools import setup
from setuptools import find_namespace_packages
def get_content(name, splitlines=False):
"""Return the file contents with project root as root folder."""
here = os.path.abspath(os.path.dirname(__file__))
path = os.path.join(here, name)
with io.open(path, "r", encoding="utf-8") as fd:
content = fd.read()
if splitlines:
content = [row for row in content.splitlines() if row]
return content
# Define some helper lists.
basenames = [
"countries",
"countriesmeta",
"gshhs",
"gshhsmeta",
"rivers",
"riversmeta",
"states",
"statesmeta"
]
resolutions = [
"c",
"l",
"i",
"h",
"f",
]
# Define data assets.
data_files = [
"%s_%s.dat" % (basename, res)
for basename, res in itertools.product(basenames, resolutions[3:])
]
setup(**{
"name":
"basemap_data_hires",
"version":
"2.0.0",
"description":
"High-resolution data assets for matplotlib basemap",
"long_description":
get_content("README.md"),
"long_description_content_type":
"text/markdown",
"author":
"Jeff Whitaker",
"author_email":
"jeffrey.s.whitaker@noaa.gov",
"maintainer":
"The Matplotlib development team",
"maintainer_email":
"matplotlib-users@python.org",
"license":
"LGPL-3.0-or-later",
"license_files": [
"COPYING",
"COPYING.LESSER",
],
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries :: Python Modules",
],
"keywords": [
"GIS",
"maps",
"plots",
],
"package_dir":
{"": "src"},
"packages":
find_namespace_packages(where="src"),
"package_data": {
"mpl_toolkits.basemap_data":
data_files,
},
"python_requires":
", ".join([
">=3.9",
"<4",
]),
"project_urls": {
"Homepage":
"https://github.com/matplotlib/basemap",
"Documentation":
"https://matplotlib.org/basemap",
"Repository":
"https://github.com/matplotlib/basemap.git",
"Issues":
"https://github.com/matplotlib/basemap/issues",
},
})
|