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

Commit 473fdd0

Browse files
authored
fix version and specify it only in one place (#176)
1 parent 68d5863 commit 473fdd0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lightning/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
2-
__version__ = "0.6.1dev"
1+
__version__ = "0.6.1.dev0"

setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# Copyright (C) 2012 Mathieu Blondel
44

5+
import re
56
import sys
67
import os
78
import setuptools
@@ -17,8 +18,11 @@
1718
MAINTAINER_EMAIL = '[email protected]'
1819
URL = 'https://github.com/scikit-learn-contrib/lightning'
1920
LICENSE = 'new BSD'
20-
DOWNLOAD_URL = 'https://github.com/scikit-learn-contrib/lightning'
21-
VERSION = '0.6.1dev'
21+
DOWNLOAD_URL = URL
22+
with open(os.path.join('lightning', '__init__.py'), encoding='utf-8') as f:
23+
match = re.search(r'__version__[ ]*=[ ]*[\"\'](?P<version>.+)[\"\']',
24+
f.read())
25+
VERSION = match.group('version').strip()
2226
MIN_PYTHON_VERSION = '3.6'
2327

2428

0 commit comments

Comments
 (0)