adding version in __init__.py instead of setup.py

This commit is contained in:
Cayo Puigdefabregas 2020-09-17 21:48:57 +02:00
parent 51f51b1e92
commit c21d54dcb5
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1 @@
__version__ = "1.0a1"

View File

@ -1,7 +1,11 @@
from pathlib import Path
import re
from pathlib import Path
from setuptools import find_packages, setup
with open("ereuse_devicehub/__init__.py", encoding="utf8") as f:
version = re.search(r'__version__ = "(.*?)"', f.read()).group(1)
test_requires = [
'pytest',
'requests_mock'
@ -9,7 +13,7 @@ test_requires = [
setup(
name='ereuse-devicehub',
version='0.1.0a1',
version=version,
url='https://github.com/ereuse/devicehub-teal',
project_urls={
'Documentation': 'http://devicehub.ereuse.org',