Skip to content

Commit

Permalink
moved version to external file
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Mar 24, 2021
1 parent 3248fed commit 959afa3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
import io
from os import path

# --- get version ---
version = "unknown"
with open("yfinance/version.py") as f:
line = f.read().strip()
version = line.replace("version = ", "").replace('"', '')
# --- /get version ---


here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
Expand All @@ -19,7 +27,7 @@

setup(
name='yfinance',
version="0.1.56",
version=version,
description='Yahoo! Finance market data downloader',
long_description=long_description,
url='https://github.com/ranaroussi/yfinance',
Expand Down
7 changes: 4 additions & 3 deletions yfinance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
# limitations under the License.
#

__version__ = "0.1.56"
__author__ = "Ran Aroussi"

from . import version
from .ticker import Ticker
from .tickers import Tickers
from .multi import download

__version__ = version.version
__author__ = "Ran Aroussi"


def pdr_override():
"""
Expand Down
1 change: 1 addition & 0 deletions yfinance/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "0.1.57"

0 comments on commit 959afa3

Please sign in to comment.