Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit b66a538e8dd48dc48279483d59eb106f06d7ff84
Author: Sergio Oliveira <sergio(a)tracy.com.br>
Date: Mon Oct 19 17:04:50 2015 -0200
Fixes to allow copr lib to be installed using setup.py
---------------------------------------------------------------
python/copr/client/__init__.py | 3 +--
python/setup.py | 23 ++++++++++++++++++++---
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/python/copr/client/__init__.py b/python/copr/client/__init__.py
index 52f7c6c..4828ca3 100644
--- a/python/copr/client/__init__.py
+++ b/python/copr/client/__init__.py
@@ -3,8 +3,7 @@ Python client for copr service.
"""
__author__ = 'vgologuz(a)redhat.com'
-__version__ = "0.0.1"
-__description__ = "Python client for copr service."
+__version__ = "1.59.0"
from .client import CoprClient
diff --git a/python/setup.py b/python/setup.py
index 3ecacf3..066748f 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -1,5 +1,9 @@
#!/usr/bin/python
+import re
+import os
+import codecs
+
from setuptools import setup
long_description = """Copr is designed to be a lightweight buildsystem
that allows contributors
@@ -9,7 +13,20 @@ is used to allow packagers to create third party repositories.
This part is a python client to the copr service."""
-from copr.client import __description__, __version__
+
+def read(*parts):
+ return codecs.open(os.path.join(os.path.dirname(__file__), *parts),
+ encoding='utf8').read()
+
+
+def find_version(*file_paths):
+ version_file = read(*file_paths)
+ version_match = re.search(r"^__version__ =
['\"]([^'\"]*)['\"]",
+ version_file, re.M)
+ if version_match:
+ return version_match.group(1)
+ raise RuntimeError("Unable to find version string.")
+
requires = [
'requests',
@@ -18,8 +35,8 @@ requires = [
]
-__version__ = __version__
-__description__ = __description__
+__version__ = find_version('copr/client/__init__.py')
+__description__ = "Python client for copr service."
__author__ = "Valentin Gologuzov"
__author_email__ = "vgologuz(a)redhat.com"
__url__ = "http://fedorahosted.org/copr/"