URL: https://github.com/freeipa/freeipa/pull/263
Author: tiran
 Title: #263: Backwards compatibility with setuptools 0.9.8
Action: opened

PR body:
"""
Setuptools 0.9.8 does not support PEP 440 version schema with +git
suffix.

Signed-off-by: Christian Heimes <chei...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/263/head:pr263
git checkout pr263
From f8c4279eaf8b03baab88c6b0d2dfb563ecf1fef8 Mon Sep 17 00:00:00 2001
From: Christian Heimes <chei...@redhat.com>
Date: Tue, 22 Nov 2016 16:08:46 +0100
Subject: [PATCH] Backwards compatibility with setuptools 0.9.8

Setuptools 0.9.8 does not support PEP 440 version schema with +git
suffix.

Signed-off-by: Christian Heimes <chei...@redhat.com>
---
 ipasetup.py.in | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/ipasetup.py.in b/ipasetup.py.in
index 5330956..5f39811 100644
--- a/ipasetup.py.in
+++ b/ipasetup.py.in
@@ -17,16 +17,21 @@
 import os
 import sys
 
+VERSION = '@VERSION@'
+
+# backwards compatibility with setuptools 0.9.8
+# split off +gitHASH suffix
+VERSION = VERSION.split('+')[0]
 
 PACKAGE_VERSION = {
     'cryptography': 'cryptography >= 0.9',
     'dnspython': 'dnspython >= 1.11.1',
     'gssapi': 'gssapi > 1.1.2',
-    'ipaclient': 'ipaclient == @VERSION@',
-    'ipalib': 'ipalib == @VERSION@',
-    'ipaplatform': 'ipaplatform == @VERSION@',
-    'ipapython': 'ipapython == @VERSION@',
-    'ipaserver': 'ipaserver == @VERSION@',
+    'ipaclient': 'ipaclient == {}'.format(VERSION),
+    'ipalib': 'ipalib == {}'.format(VERSION),
+    'ipaplatform': 'ipaplatform == {}'.format(VERSION),
+    'ipapython': 'ipapython == {}'.format(VERSION),
+    'ipaserver': 'ipaserver == {}'.format(VERSION),
     'kdcproxy': 'kdcproxy >= 0.3',
     'netifaces': 'netifaces >= 0.10.4',
     'python-nss': 'python-nss >= 0.16',
@@ -37,7 +42,7 @@ PACKAGE_VERSION = {
 
 
 common_args = dict(
-    version="@VERSION@",
+    version=VERSION,
     license="GPLv3",
     author="FreeIPA Developers",
     author_email="freeipa-devel@redhat.com",
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to