Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion dxfeed/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
from dxfeed.wrappers.endpoint import Endpoint
from dxfeed.core.utils.handler import EventHandler, DefaultHandler
import pkg_resources
import toml
from pathlib import Path


__version__ = pkg_resources.get_distribution('dxfeed').version
try:
__version__ = pkg_resources.get_distribution('dxfeed').version
except pkg_resources.DistributionNotFound:
pyproject = toml.load(Path(__file__).parents[1] / 'pyproject.toml')
__version__ = pyproject['tool']['poetry']['version']
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,24 @@ exclude = ['dxfeed/dxfeed-c-api/wrappers*',
[tool.poetry.dependencies]
python = '^3.6'
pandas = '^0.25.1'
toml = '^0.10.0'
# The following dependencies are used for docs generation when installed as extras
# (e.g. pip install nornir[docs])
# Currently they have to be specified as non-dev dependencies with optional = true
# Refer to: https://github.com/sdispater/poetry/issues/129
# Issue to watch for: https://github.com/python-poetry/poetry/issues/1644
toml = { version = '^0.10.0', optional = true }
jupyter = { version = '^1.0.0', optional = true }

[tool.poetry.dev-dependencies]
cython = '^0.29.13'
taskipy = '^1.1.3'
pytest = '^5.3.5'
sphinx = '^2.4.4'
toml = '^0.10.0'
sphinx_rtd_theme = '^0.4.3'
pygments = '^2.6.1'

[tool.poetry.extras]
docs = ['toml', 'jupyter']
docs = ['jupyter']

[tool.taskipy.tasks]
clear = 'find dxfeed/core -type f \( -iname *.c -o -iname *.cpp -o -iname *.pyd -o -iname *.so \) -delete'
Expand Down