Skip to content

Commit e835d9b

Browse files
committed
MAINT improve version handling
1 parent b8a0b1d commit e835d9b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

openml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from .tasks import OpenMLTask, OpenMLSplit
2727
from .flows import OpenMLFlow
2828

29-
__version__ = "0.5.0dev"
29+
from .__version__ import __version__
3030

3131

3232
def populate_cache(task_ids=None, dataset_ids=None, flow_ids=None,

openml/__version__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Version information."""
2+
3+
# The following line *must* be the last in the module, exactly as formatted:
4+
__version__ = "0.5.0dev"

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import setuptools
33
import sys
44

5+
with open("openml/__version__.py") as fh:
6+
version = fh.readlines()[-1].split()[-1].strip("\"'")
7+
58

69
requirements_file = os.path.join(os.path.dirname(__file__), 'requirements.txt')
710
requirements = []
@@ -44,7 +47,7 @@
4447
description="Python API for OpenML",
4548
license="GPLv3",
4649
url="http://openml.org/",
47-
version="0.3.0",
50+
version=version,
4851
packages=setuptools.find_packages(),
4952
package_data={'': ['*.txt', '*.md']},
5053
install_requires=requirements,

0 commit comments

Comments
 (0)