kepler.pulse 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: kepler.pulse
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Trade day handling utilities for A-share market
5
5
  Project-URL: Homepage, https://github.com/liubola/kepler-pulse
6
6
  Project-URL: Repository, https://github.com/liubola/kepler-pulse
@@ -3,7 +3,7 @@ requires = ["hatchling"]
3
3
  build-backend = "hatchling.build"
4
4
  [project]
5
5
  name = "kepler.pulse"
6
- version = "0.2.3"
6
+ version = "0.2.4"
7
7
  description = "Trade day handling utilities for A-share market"
8
8
  readme = "README.md"
9
9
  license = "GPL-3.0-or-later"
@@ -25,8 +25,12 @@ Examples:
25
25
  """
26
26
 
27
27
  from .core.trading_calendar import Calendar, CalendarError
28
+ from importlib import metadata
28
29
 
29
- __version__ = '2.0.0'
30
+ try:
31
+ __version__ = metadata.version("kepler.pulse")
32
+ except metadata.PackageNotFoundError: # 未安装时(直接从源码目录导入)
33
+ __version__ = "unknown"
30
34
  __author__ = 'liubola'
31
35
 
32
36
  __all__ = [
File without changes
File without changes
File without changes
File without changes