File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-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_info__
3+ except ImportError :
4+ __version__ = "unknown"
5+ __version_info__ = ()
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,10 @@ def test_import_and_version() -> None:
22 import django_elastipymemcache
33
44 assert hasattr (django_elastipymemcache , "__version__" )
5+ assert django_elastipymemcache .__version_info__ != ()
6+
7+ assert hasattr (django_elastipymemcache , "__version_info__" )
8+ assert django_elastipymemcache .__version__ != "unknown"
59
610
711def test_backend_importable () -> None :
You can’t perform that action at this time.
0 commit comments