Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 03162567274cba22b47eba75dfa5a52a9efdc2af
Author: Sergio Oliveira <sergio(a)tracy.com.br>
Date: Thu Oct 22 09:27:09 2015 -0200
Added version parse from specs instead of __init__
---------------------------------------------------------------
cli/setup.py | 4 ++--
python/setup.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cli/setup.py b/cli/setup.py
index e55b978..202a840 100644
--- a/cli/setup.py
+++ b/cli/setup.py
@@ -25,7 +25,7 @@ def read(*parts):
def find_version(*file_paths):
version_file = read(*file_paths)
- version_match = re.search(r"^__version__ =
['\"]([^'\"]*)['\"]",
+ version_match = re.search(r"^Version: (.*)$",
version_file, re.M)
if version_match:
return version_match.group(1)
@@ -33,7 +33,7 @@ def find_version(*file_paths):
__name__ = 'copr-cli'
-__version__ = find_version('copr_cli/main.py')
+__version__ = find_version('copr-cli.spec')
__description__ = "CLI tool to run copr"
__author__ = "Pierre-Yves Chibon"
__author_email__ = "pingou(a)pingoured.fr"
diff --git a/python/setup.py b/python/setup.py
index 066748f..b831232 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -21,10 +21,10 @@ def read(*parts):
def find_version(*file_paths):
version_file = read(*file_paths)
- version_match = re.search(r"^__version__ =
['\"]([^'\"]*)['\"]",
+ version_match = re.search(r"^Version: (.*)$",
version_file, re.M)
if version_match:
- return version_match.group(1)
+ return version_match.group(1).strip()
raise RuntimeError("Unable to find version string.")
@@ -35,7 +35,7 @@ requires = [
]
-__version__ = find_version('copr/client/__init__.py')
+__version__ = find_version('python-copr.spec')
__description__ = "Python client for copr service."
__author__ = "Valentin Gologuzov"
__author_email__ = "vgologuz(a)redhat.com"