Skip to content

Commit

Permalink
Merge pull request #190 from neutrinoceros/bld/hatch
Browse files Browse the repository at this point in the history
BLD: migrate build backend from setuptools to hatchling
  • Loading branch information
neutrinoceros authored Oct 30, 2024
2 parents c243024 + 88607d8 commit 39c6ffd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
5 changes: 4 additions & 1 deletion cmyt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from .cm import *

__version__ = "2.0.0"
from importlib.metadata import version

__version__ = version("cmyt")
del version
18 changes: 3 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "cmyt"
version = "2.0.0"
description = "A collection of Matplotlib colormaps from the yt project"
authors = [
{ name = "The yt project", email = "[email protected]" },
Expand All @@ -28,7 +29,6 @@ dependencies = [
"matplotlib>=3.5.1",
"numpy>=1.22.3, <3",
]
dynamic = ["version"]

[project.license]
text = "BSD 3-Clause"
Expand All @@ -42,18 +42,6 @@ Homepage = "https://yt-project.org/"
Source = "https://github.com/yt-project/cmyt/"
Tracker = "https://github.com/yt-project/cmyt/issues"

[tool.setuptools.dynamic]
version = {attr = "cmyt.__version__"}

[tool.setuptools]
license-files = [
"LICENSE",
]
include-package-data = false

[tool.setuptools.packages.find]
namespaces = false

[tool.ruff.lint]
exclude = ["*__init__.py"]
ignore = ["E501"]
Expand Down

0 comments on commit 39c6ffd

Please sign in to comment.