Skip to content

Commit

Permalink
Use VERSION file for automated versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Dejan Knezevic committed Oct 31, 2019
1 parent b181057 commit 31ca2f0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 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 "__version__ = '$TRAVIS_TAG'" > sevenbridges/version.py
before_deploy: echo $TRAVIS_TAG > VERSION

deploy:
provider: pypi
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ universal=1
[metadata]
description-file =
README.md

[flake8]
per-file-ignores =
sevenbridges/__init__.py:E402
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import io
import os
import sys

from setuptools import setup, find_packages
from sevenbridges.version import __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()

install_requires = ["requests>=2.20.0", "six>=1.10.0"]
if sys.version_info < (3,):
install_requires.append("futures>=3.0.4")

setup(
name='sevenbridges-python',
version=__version__,
version=version,
description='SBG API python client bindings',
install_requires=install_requires,
long_description=io.open('README.md', 'r', encoding='utf-8').read(),
Expand Down
9 changes: 8 additions & 1 deletion sevenbridges/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
:copyright: 2018 Seven Bridges Genomics Inc.
:license: Apache 2.0
"""
import io
import os
import ssl
import logging

from sevenbridges.version import __version__ # noqa

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


from sevenbridges.api import Api
from sevenbridges.config import Config
Expand Down
1 change: 0 additions & 1 deletion sevenbridges/version.py

This file was deleted.

0 comments on commit 31ca2f0

Please sign in to comment.