mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
fix setup.py with new __init__.py boilerplate
This commit is contained in:
parent
2e36e0c910
commit
79596dc613
2
setup.py
2
setup.py
|
@ -12,7 +12,7 @@ def get_version(package):
|
|||
Return package version as listed in `__version__` in `init.py`.
|
||||
"""
|
||||
init_py = open(os.path.join(package, '__init__.py')).read()
|
||||
return re.match("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
|
||||
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
|
||||
|
||||
|
||||
def get_packages(package):
|
||||
|
|
Loading…
Reference in New Issue
Block a user