Skip to content

Commit

Permalink
Move VERSION file to sevenbridges package
Browse files Browse the repository at this point in the history
  • Loading branch information
Dejan Knezevic committed Oct 31, 2019
1 parent a4c8067 commit 5668932
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ script:
- flake8 sevenbridges
- py.test -v --cov=sevenbridges

before_deploy: echo $TRAVIS_TAG > VERSION
before_deploy: echo $TRAVIS_TAG > sevenbridges/VERSION

deploy:
provider: pypi
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

from setuptools import setup, find_packages

package_dir, _ = os.path.split(__file__)
version_path = os.path.join(package_dir, "VERSION")

version = '0.0.1+local-build'
if os.path.isfile('VERSION'):
with io.open('VERSION', 'r', encoding='utf-8') as f:
version = f.read()
if os.path.isfile(version_path):
with io.open(version_path, 'r', encoding='utf-8') as f:
__version__ = f.read()

install_requires = ["requests>=2.20.0", "six>=1.10.0"]
if sys.version_info < (3,):
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions sevenbridges/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
import ssl
import logging

package_dir, _ = os.path.split(__file__)
version_path = os.path.join(package_dir, "VERSION")

__version__ = '0.0.1+local-build'
if os.path.isfile('VERSION'):
with io.open('VERSION', 'r', encoding='utf-8') as f:
if os.path.isfile(version_path):
with io.open(version_path, 'r', encoding='utf-8') as f:
__version__ = f.read()


Expand Down

0 comments on commit 5668932

Please sign in to comment.