summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2017-04-10 10:00:23 +0200
committerMartin Basti <mbasti@redhat.com>2017-04-26 12:31:11 +0200
commit26ab51ddf47f421f3404709052db89f08c05adaa (patch)
tree1083fa1c0bef52502790d21f281b8156a2dffeda
parent38276d3473ecf2a4cc5b5e2a107347f046625626 (diff)
downloadfreeipa-26ab51ddf47f421f3404709052db89f08c05adaa.tar.gz
freeipa-26ab51ddf47f421f3404709052db89f08c05adaa.tar.xz
freeipa-26ab51ddf47f421f3404709052db89f08c05adaa.zip
Correct PyPI package dependencies
* Remove unused install requires from ipapython * Add missing requirements to ipaserver * Correct dependencies for yubico otptoken * Add explicit dependency on cffi for csrgen * Python 2 uses python-ldap, Python 3 pyldap https://pagure.io/freeipa/issue/6875 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
-rw-r--r--ipaclient/setup.py5
-rwxr-xr-xipapython/setup.py6
-rwxr-xr-xipaserver/setup.py5
-rw-r--r--ipasetup.py.in16
-rw-r--r--ipatests/setup.py3
-rw-r--r--tox.ini3
6 files changed, 23 insertions, 15 deletions
diff --git a/ipaclient/setup.py b/ipaclient/setup.py
index ccb539667..0140fd5a4 100644
--- a/ipaclient/setup.py
+++ b/ipaclient/setup.py
@@ -50,12 +50,11 @@ if __name__ == '__main__':
],
},
install_requires=[
+ "cffi",
"cryptography",
"ipalib",
"ipapython",
"jinja2",
- "python-yubico",
- "pyusb",
"qrcode",
"six",
],
@@ -66,7 +65,7 @@ if __name__ == '__main__':
},
extras_require={
"install": ["ipaplatform"],
- "otptoken_yubikey": ["yubico", "usb"]
+ "otptoken_yubikey": ["python-yubico", "pyusb"],
},
zip_safe=False,
)
diff --git a/ipapython/setup.py b/ipapython/setup.py
index f4bc3f868..4f7153039 100755
--- a/ipapython/setup.py
+++ b/ipapython/setup.py
@@ -41,16 +41,14 @@ if __name__ == '__main__':
"cryptography",
"dnspython",
"gssapi",
- "jwcrypto",
# "ipalib", # circular dependency
- "pyldap",
"netaddr",
"netifaces",
- "requests",
"six",
],
extras_require={
- ":python_version<'3'": ["enum34"],
+ ":python_version<'3'": ["enum34", "python-ldap"],
+ ":python_version>='3'": ["pyldap"],
"install": ["dbus-python"], # for certmonger
},
)
diff --git a/ipaserver/setup.py b/ipaserver/setup.py
index 097508fd7..f48cef4b2 100755
--- a/ipaserver/setup.py
+++ b/ipaserver/setup.py
@@ -55,10 +55,11 @@ if __name__ == '__main__':
"ipalib",
"ipaplatform",
"ipapython",
+ "jwcrypto",
"lxml",
"netaddr",
"pyasn1",
- "pyldap",
+ "requests",
"six",
],
entry_points={
@@ -70,6 +71,8 @@ if __name__ == '__main__':
],
},
extras_require={
+ ":python_version<'3'": ["python-ldap"],
+ ":python_version>='3'": ["pyldap"],
# These packages are currently not available on PyPI.
"dcerpc": ["samba", "pysss", "pysss_nss_idmap"],
"hbactest": ["pyhbac"],
diff --git a/ipasetup.py.in b/ipasetup.py.in
index b0a50512f..2ad57e2d3 100644
--- a/ipasetup.py.in
+++ b/ipasetup.py.in
@@ -101,6 +101,7 @@ common_args = dict(
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
@@ -138,13 +139,20 @@ def ipasetup(name, doc, **kwargs):
cmdclass = setup_kwargs.setdefault('cmdclass', {})
cmdclass['build_py'] = build_py
- # Env markers like ":python_version<'3.3'" are not supported by
+ # Env markers like ":python_version<'3'" are not supported by
# setuptools < 18.0.
if 'extras_require' in setup_kwargs and SETUPTOOLS_VERSION < (18, 0, 0):
for k in list(setup_kwargs['extras_require']):
- if k.startswith(':'):
- req = setup_kwargs.setdefault('install_requires', [])
- req.extend(setup_kwargs['extras_require'].pop(k))
+ if not k.startswith(':'):
+ 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)
+ else:
+ raise ValueError(k, values)
os.chdir(local_path)
try:
diff --git a/ipatests/setup.py b/ipatests/setup.py
index 4c02c799a..00b933404 100644
--- a/ipatests/setup.py
+++ b/ipatests/setup.py
@@ -68,12 +68,13 @@ if __name__ == '__main__':
"ipapython",
"nose",
"polib",
- "pyldap",
"pytest",
"pytest_multihost",
"six",
],
extras_require={
+ ":python_version<'3'": ["python-ldap"],
+ ":python_version>='3'": ["pyldap"],
"integration": ["dbus-python", "pyyaml", "ipaserver"],
"ipaserver": ["ipaserver"],
"webui": ["selenium", "pyyaml", "ipaserver"],
diff --git a/tox.ini b/tox.ini
index db551dfac..ccface96c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -22,8 +22,7 @@ commands=
[testenv:pylint2]
basepython=python2.7
deps=
- ipaclient
- ipapython[certmonger]
+ ipaclient[otptoken_yubikey]
pylint
commands=
{envpython} -m pylint \