Skip to content

Commit

Permalink
Add __version__ to module
Browse files Browse the repository at this point in the history
  • Loading branch information
tribal-tec committed Jul 24, 2018
1 parent 541d499 commit 610b88b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion python/brayns/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

"""The Brayns python client library provides access to remote control a running Brayns instance."""

__all__ = ['Client', 'RpcClient']
from .client import Client
from .rpcclient import RpcClient
from .version import VERSION as __version__

__all__ = ['Client', 'RpcClient']
6 changes: 5 additions & 1 deletion python/brayns/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
# All rights reserved. Do not distribute without further notice.

"""The version of the brayns package"""
from pkg_resources import get_distribution, DistributionNotFound

VERSION = "0.7.0.dev0"
try:
VERSION = get_distribution('brayns').version # pylint: disable=no-member
except DistributionNotFound: # pragma: no cover
VERSION = 'brayns-local'
1 change: 1 addition & 0 deletions python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[metadata]
version = 0.7.0.dev10
name = brayns
summary = Brayns python API
home-page = https://github.com/BlueBrain/Brayns
Expand Down
6 changes: 2 additions & 4 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

"""setup.py"""
import os

from setuptools import setup

try: # for pip >= 10
from pip._internal.req import parse_requirements
from pip._internal.download import PipSession
Expand All @@ -48,14 +48,12 @@ def parse_reqs(reqs_file):

REQS = parse_reqs(os.path.join(BASEDIR, "requirements.txt"))

# read the contents of your README.md
# read the contents of README.md
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md')) as f:
long_description = f.read()

exec(open('brayns/version.py').read())
setup(
version=VERSION,
packages=['brayns'],
install_requires=REQS,
long_description=long_description,
Expand Down

0 comments on commit 610b88b

Please sign in to comment.