Skip to content

Commit 06c1118

Browse files
committed
[EN-1712] version for dev environment
1 parent 89f8b07 commit 06c1118

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dxfeed/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
from dxfeed.core.utils.handler import EventHandler, DefaultHandler
33
import pkg_resources
44

5-
6-
__version__ = pkg_resources.get_distribution('dxfeed').version
5+
try:
6+
__version__ = pkg_resources.get_distribution('dxfeed').version
7+
except pkg_resources.DistributionNotFound:
8+
import toml
9+
from pathlib import Path
10+
pyproject = toml.load(Path(__file__).parents[1].joinpath('pyproject.toml'))
11+
__version__ = pyproject['tool']['poetry']['version']

0 commit comments

Comments
 (0)