URL: https://github.com/freeipa/freeipa/pull/787 Author: MartinBasti Title: #787: ipasetup: fix dependencies handling based on python version Action: opened
PR body: """ On RHEL system ipasetup is failing: ``` ValueError: (":python_version>='3'", ['pyldap']) ``` Our RHEL re-implementation of setuptools logic should ignore python3 packages when python3 is not available. https://pagure.io/freeipa/issue/6875 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/787/head:pr787 git checkout pr787
From 04c3936319728494d9992a4cbcdd87d3c4db0765 Mon Sep 17 00:00:00 2001 From: Martin Basti <mba...@redhat.com> Date: Mon, 15 May 2017 18:46:43 +0200 Subject: [PATCH] ipasetup: fix dependencies handling based on python version On RHEL system ipasetup is failing: ``` ValueError: (":python_version>='3'", ['pyldap']) ``` Our RHEL re-implementation of setuptools logic should ignore python3 packages when python3 is not available. https://pagure.io/freeipa/issue/6875 --- ipasetup.py.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ipasetup.py.in b/ipasetup.py.in index 2ad57e2..bd23504 100644 --- a/ipasetup.py.in +++ b/ipasetup.py.in @@ -147,10 +147,12 @@ def ipasetup(name, doc, **kwargs): continue values = setup_kwargs['extras_require'].pop(k) req = setup_kwargs.setdefault('install_requires', []) - if k == ":python_version<'3'" and sys.version_info.major == 2: - req.extend(values) - elif k == ":python_version>='3'" and sys.version_info.major >= 3: - req.extend(values) + if k == ":python_version<'3'": + if sys.version_info.major == 2: + req.extend(values) + elif k == ":python_version>='3'": + if sys.version_info.major >= 3: + req.extend(values) else: raise ValueError(k, values)
-- 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