François Boulogne 4 months ago
parent 6e823beec8
commit 2e35cb2a0b

@ -4,8 +4,8 @@ import os
import re import re
from setuptools import setup, find_packages from setuptools import setup, find_packages
def read_version(): def read_version(name):
with open(os.path.join(os.path.dirname(__file__), 'labhw', '__init__.py')) as f: with open(os.path.join(os.path.dirname(__file__), name, '__init__.py')) as f:
for line in f: for line in f:
match = re.match(r"^__version__ = ['\"]([^'\"]*)['\"]", line) match = re.match(r"^__version__ = ['\"]([^'\"]*)['\"]", line)
if match: if match:
@ -24,7 +24,7 @@ with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
setup( setup(
name = 'labhw', name = 'labhw',
version = '0.1.1', version = read_version('labhw'),
author = "Francois Boulogne", author = "Francois Boulogne",
license = "BSD", license = "BSD",
author_email = "devel@sciunto.org", author_email = "devel@sciunto.org",

Loading…
Cancel
Save