Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 42d6fbf

Browse files
authored
Merge pull request #55 from chrisburr/set-version
Add __version__ attribute and use it with pypi deployments
2 parents 4ab672f + bae82d5 commit 42d6fbf

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

root_pandas/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from .readwrite import read_root
22
from .readwrite import to_root
3+
from .version import __version__
34

45
__all__ = [
6+
'__version__',
57
'read_root',
68
'to_root',
79
]

root_pandas/version.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__all__ = [
2+
'__version__',
3+
'version',
4+
'version_info',
5+
]
6+
7+
__version__ = '0.3.1'
8+
version = __version__
9+
version_info = tuple(__version__.split('.'))

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
import os
2+
13
from setuptools import setup
24

5+
6+
def get_version():
7+
g = {}
8+
exec(open(os.path.join("root_pandas", "version.py")).read(), g)
9+
return g["__version__"]
10+
11+
312
setup(name='root_pandas',
4-
version='0.2.0',
13+
version=get_version(),
514
description='Read and save DataFrames from and to ROOT files',
615
url='http://github.com/chrisburr/root_pandas',
716
author='Chris Burr',

0 commit comments

Comments
 (0)