Skip to content

Commit

Permalink
switch from setup.py to pyproject.toml for install
Browse files Browse the repository at this point in the history
- single-source version number to pyproject.toml
- implement optional dependency groups
  • Loading branch information
raphaelquast committed Dec 20, 2023
1 parent 7d18dbc commit 223086b
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 75 deletions.
3 changes: 2 additions & 1 deletion eomaps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import importlib.metadata
from .helpers import register_modules as _register_modules

# address numpy runtime warning concerning binary incompatibility when
Expand All @@ -6,8 +7,8 @@

from .eomaps import Maps
from .mapsgrid import MapsGrid
from ._version import __version__

__version__ = importlib.metadata.version("eomaps")
__author__ = "Raphael Quast"

# Follow conventions used by cartopy to setup cache directory
Expand Down
1 change: 0 additions & 1 deletion eomaps/_version.py

This file was deleted.

3 changes: 2 additions & 1 deletion eomaps/eomaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import gc
from textwrap import fill
from contextlib import contextmanager, ExitStack
import importlib.metadata

import numpy as np

Expand Down Expand Up @@ -71,7 +72,7 @@

from ._data_manager import DataManager

from ._version import __version__
__version__ = importlib.metadata.version("eomaps")


def _handle_backends():
Expand Down
69 changes: 69 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["eomaps"]

[project]
name = "eomaps"
version = "7.4"
description = "A library to create interactive maps of geographical datasets."
requires-python = ">=3.8"

authors = [
{ name="Raphael Quast", email="[email protected]" },
]

keywords = ["Visualization", "Plotting", "Maps", "Geographical Data"]

classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
]

dependencies = [
"numpy",
"scipy",
"matplotlib>=3.4",
"cartopy>=0.20.0",
"descartes",
"pyproj",
"packaging",
"click"
]

[project.optional-dependencies]

all = ["eomaps[io, classify, wms, shade, gui]"]

all_nogui = ["eomaps[io, classify, wms, shade]"]

io = [
"pandas",
"geopandas",
"xarray",
"netcdf4",
"rioxarray"
]

classify = ["mapclassify"]

wms = [
"owslib",
"requests",
"cairosvg",
]

shade = ["datashader"]

gui = [
"PyQt5",
"qtpy"
]


[project.urls]
Documentation = "https://eomaps.readthedocs.io/"
Repository = "https://github.com/raphaelquast/eomaps"
72 changes: 0 additions & 72 deletions setup.py

This file was deleted.

0 comments on commit 223086b

Please sign in to comment.