Skip to content

Commit

Permalink
Add long description and version in setup.py.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 302047654
  • Loading branch information
mtthss committed Apr 23, 2020
1 parent d251b24 commit 4aa02b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rlax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
from rlax._src.value_learning import vtrace
from rlax._src.vtrace import vtrace_td_error_and_advantage

__version__ = "0.0.1"

__all__ = (
"add_gaussian_noise",
"add_ornstein_uhlenbeck_noise",
Expand Down
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,26 @@
from setuptools import find_namespace_packages
from setuptools import setup


def _get_version():
with open('rlax/__init__.py') as fp:
for line in fp:
if line.startswith('__version__'):
g = {}
exec(line, g) # pylint: disable=exec-used
return g['__version__']
raise ValueError('`__version__` not defined in `rlax/__init__.py`')


setup(
name='rlax',
version=_get_version(),
url='https://github.com/deepmind/rlax',
license='Apache 2.0',
author='DeepMind',
description=('A library of reinforcement learning building blocks in JAX.'),
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author_email='rlax-dev@google.com',
keywords='reinforcement-learning python machine learning',
packages=find_namespace_packages(exclude=['*_test.py']),
Expand Down

0 comments on commit 4aa02b3

Please sign in to comment.