Skip to content

Commit 609ca82

Browse files
committed
Add hatch for building
1 parent 074fe31 commit 609ca82

4 files changed

Lines changed: 11 additions & 24 deletions

File tree

causarray/__about__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.1"

causarray/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
from causarray.utils import prep_causarray_data, reset_random_seeds, comp_size_factor
1010

1111
from causarray.gcate import *
12-
from causarray._version import __version__
12+
from causarray.__about__ import __version__
1313

14-
__version__ = '.'.join(__version__.split('.')[:3])
1514
__license__ = "MIT"
1615

1716
__author__ = "Jin-Hong Du, Maya Shen, Hansruedi Mathys, and Kathryn Roeder"

causarray/_version.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

pyproject.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel", "hatchling"]
3+
build-backend = "hatchling.build"
44

55
[tool.hatch.build.targets.sdist]
66
only-packages = true
@@ -54,7 +54,10 @@ classifiers = [
5454

5555
]
5656

57-
[tool.setuptools_scm]
58-
version_scheme = "no-guess-dev"
59-
local_scheme = "no-local-version"
60-
write_to = "causarray/_version.py"
57+
58+
59+
[tool.hatch.version]
60+
path = "causarray/__about__.py"
61+
62+
[tool.hatch.version.raw-options]
63+
local_scheme = "no-local-version"

0 commit comments

Comments
 (0)