Skip to content

Commit

Permalink
MNT: Update ACT to use setuptools-scm.
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman committed Oct 30, 2024
1 parent f4f1ba0 commit 16e4605
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1,878 deletions.
13 changes: 8 additions & 5 deletions act/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"""

import importlib.metadata as _importlib_metadata

import lazy_loader as lazy

# No more pandas warnings
from pandas.plotting import register_matplotlib_converters

from ._version import get_versions

register_matplotlib_converters()

# Import early so these classes are available to the object
Expand All @@ -29,6 +29,9 @@
]
__getattr__, __dir__, _ = lazy.attach(__name__, submodules)

# Version for source builds
vdict = get_versions()
__version__ = vdict['version']
# Get the version
try:
__version__ = _importlib_metadata.version("act-atmos")
except _importlib_metadata.PackageNotFoundError:
# package is not installed
__version__ = "0.0.0"
7 changes: 0 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,3 @@ skip=

[tool:pytest]
addopts = --cov=./ --cov-report=xml --verbose

[versioneer]
VCS = git
style = pep440-post
versionfile_source = act/_version.py
versionfile_build = act/_version.py
tag_prefix = v
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
include_package_data=True,
package_data={'act': []},
scripts=glob.glob("scripts/*"),
setup_requires=["setuptools_scm", "setuptools"],
use_scm_version={
"version_scheme": "post-release",
"local_scheme": "dirty-tag",
},
install_requires=requirements,
license='BSD (3-clause)',
classifiers=[
Expand Down
Loading

0 comments on commit 16e4605

Please sign in to comment.