File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ __pycache__/*
1919.pydevproject
2020.settings
2121.idea
22+ .vscode
2223tags
24+ src /twelvedata /_version.py
2325
2426# Package files
2527* .egg
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" setuptools" , " wheel" ]
3- build-backend = " setuptools.build_meta:__legacy__"
2+ requires = [" setuptools>=45" , " wheel" , " setuptools-scm[toml]>=6.2" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [tool .setuptools_scm ]
6+ write_to = " src/twelvedata/_version.py"
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ packages = find:
2323include_package_data = True
2424package_dir =
2525 =src
26- # DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
27- setup_requires = pyscaffold>=3.1a0,<3.2a0
2826install_requires =
2927 pytimeparse>=1.1,<2
3028 requests>=2.22,<3
@@ -89,8 +87,6 @@ build = bdist_wheel
8987release = build upload
9088
9189[bdist_wheel]
92- # Use this option if your package is pure-python
93- universal = 1
9490
9591[build_sphinx]
9692source_dir = docs
@@ -110,9 +106,3 @@ exclude =
110106 dist
111107 .eggs
112108 docs/conf.py
113-
114- [pyscaffold]
115- # PyScaffold's parameters when the project was created.
116- # This will be used when updating. Do not change!
117- version = 3.1
118- package = twelvedata
Original file line number Diff line number Diff line change 33"""
44 Setup file for twelvedata.
55 Use setup.cfg to configure your project.
6-
7- This file was generated with PyScaffold 3.1.
8- PyScaffold helps you to put up the scaffold of your new Python project.
9- Learn more under: https://pyscaffold.org/
106"""
11- import sys
12-
13- from pkg_resources import require , VersionConflict
147from setuptools import setup
158
16- try :
17- require ('setuptools>=38.3' )
18- except VersionConflict :
19- print ("Error: version of setuptools is too old (<38.3)!" )
20- sys .exit (1 )
21-
22-
239if __name__ == "__main__" :
24- setup (use_pyscaffold = True )
10+ setup ()
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
2- import importlib .metadata
32from .client import TDClient
43
54try :
6- # Change here if project is renamed and does not equal the package name
7- dist_name = __name__
8- __version__ = importlib .metadata .version (dist_name )
9- except ImportError as e :
10- __version__ = "unknown"
5+ from ._version import version as __version__
6+ except ImportError :
7+ try :
8+ import importlib .metadata
9+ __version__ = importlib .metadata .version (__name__ )
10+ except Exception :
11+ __version__ = "unknown"
You can’t perform that action at this time.
0 commit comments