File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1- __version__ = "3.0.0"
1+ try :
2+ from ._version import __version__ , __version_tuple__
3+ except ImportError :
4+ __version__ = "unknown"
5+ __version_tuple__ = ()
6+
7+ __all__ = [
8+ "__version__" ,
9+ "__version_tuple__" ,
10+ ]
Original file line number Diff line number Diff line change 11[build-system ]
22requires = [
33 " hatchling>=1.25" ,
4+ " hatch-vcs>=0.5.0" ,
45]
56build-backend = " hatchling.build"
67
@@ -117,7 +118,7 @@ plugins = [
117118django_settings_module = " tests.settings"
118119
119120[tool .hatch .version ]
120- path = " django_elastipymemcache/__init__.py "
121+ source = " vcs "
121122
122123[tool .hatch .build .targets .sdist ]
123124include = [
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ def test_import_and_version() -> None:
22 import django_elastipymemcache
33
44 assert hasattr (django_elastipymemcache , "__version__" )
5+ assert django_elastipymemcache .__version__ != "unknown"
6+ assert hasattr (django_elastipymemcache , "__version__tuple__" )
7+ assert django_elastipymemcache .__version_tuple__ != ()
58
69
710def test_backend_importable () -> None :
You can’t perform that action at this time.
0 commit comments