Write version to sdist
MODIFY
.gitignore
.gitignore
@@ -128,3 +128,4 @@ dmypy.json
# Pyre type checker
.pyre/
+_version.py

MODIFY
pangeo_forge_recipes/__init__.py
pangeo_forge_recipes/__init__.py
-from pkg_resources import DistributionNotFound, get_distribution
-
-# from pangeo_forge_recipes.pipelines import AbstractPipeline
-
try:
- __version__ = get_distribution(__name__).version
-except DistributionNotFound: # noqa: F401
- # package is not installed
- pass
+ from ._version import __version__
+except ImportError:
+ __version__ = "unknown"
-del get_distribution, DistributionNotFound
+del _version

MODIFY
pyproject.toml
pyproject.toml
@@ -7,3 +7,5 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
+write_to = "pangeo_forge_recipes/_version.py"
+write_to_template = "__version__ = '{version}'"
\ No newline at end of file

Write version to sdist