Skip to content

Commit

Permalink
Add default version tag to setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkedev committed Apr 28, 2020
1 parent 60d6ed9 commit ed4a7a9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import os
from re import match

from setuptools import find_packages
from setuptools import setup

tag = os.popen('git describe').read()
version = '0.0.0' if match(r"v[\d\.]+", tag) is None else tag[1:]

setup(
name='mpr',
version=os.popen('git describe').read()[1:],
version=version,
author='Andrew Kirkegaard',
author_email='andrew.kirkegaard@gmail.com',
url='https://github.com/gumballhead/mpr',
Expand All @@ -24,7 +29,7 @@
'aiohttp >3.6, <4.0',
'numpy >1.15.0, <1.19.0',
'pandas >1.0.0, <1.1.0',
'isoweek >1.3.0, <1.4.0',
'python-dateutil >2.8.0, <2.9.0',
'pytz==2019.3'
],
setup_requires=['wheel'])

0 comments on commit ed4a7a9

Please sign in to comment.