File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22from .obspy_github_api import *
3+
4+ __version__ = '0.0.0.dev'
Original file line number Diff line number Diff line change 11import inspect
22import os
3+ import re
34from setuptools import setup
45
56INSTALL_REQUIRES = [
1213 inspect .currentframe ())))
1314
1415
16+ # get the package version from from the main __init__ file.
17+ version_regex_pattern = r"__version__ += +(['\"])([^\1]+)\1"
18+ for line in open (os .path .join (SETUP_DIRECTORY , 'obspy_github_api' ,
19+ '__init__.py' )):
20+ if '__version__' in line :
21+ version = re .match (version_regex_pattern , line ).group (2 )
22+
23+
1524def find_packages ():
1625 """
1726 Simple function to find all modules under the current folder.
@@ -25,7 +34,7 @@ def find_packages():
2534
2635setup (
2736 name = "obspy_github_api" ,
28- version = "0.0.0.dev" ,
37+ version = version ,
2938 description = "Helper routines to interact with obspy/obspy via GitHub API" ,
3039 author = "Tobias Megies" ,
3140
You can’t perform that action at this time.
0 commit comments