diff options
author | Christian Heimes <cheimes@redhat.com> | 2016-10-27 14:04:58 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-16 22:58:39 +0100 |
commit | 8346e1b067483d4d836627a267805bbe8d6e7efa (patch) | |
tree | e4206cfe30c39cfcc7aebfa8937ea1620c623822 | |
parent | 6ca96b3db03d4f3c5dbf465ca3d36bd563771c47 (diff) | |
download | freeipa-8346e1b067483d4d836627a267805bbe8d6e7efa.tar.gz freeipa-8346e1b067483d4d836627a267805bbe8d6e7efa.tar.xz freeipa-8346e1b067483d4d836627a267805bbe8d6e7efa.zip |
Add install requirements to Python packages
https://fedorahosted.org/freeipa/ticket/6468
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 21 | ||||
-rw-r--r-- | Makefile.python.am | 6 | ||||
-rw-r--r-- | ipaclient/setup.py | 14 | ||||
-rw-r--r-- | ipalib/setup.py | 11 | ||||
-rw-r--r-- | ipaplatform/setup.py | 10 | ||||
-rwxr-xr-x | ipapython/setup.py | 23 | ||||
-rwxr-xr-x | ipaserver/setup.py | 26 | ||||
-rw-r--r-- | ipasetup.py.in | 23 | ||||
-rw-r--r-- | ipatests/setup.py | 25 |
10 files changed, 157 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index de61aff50..2bacc85e7 100644 --- a/.gitignore +++ b/.gitignore @@ -88,4 +88,3 @@ freeipa2-dev-doc /ipaplatform/paths.py /ipaplatform/services.py /ipaplatform/tasks.py -/ipaplatform/setup.py diff --git a/Makefile.am b/Makefile.am index 0ef543347..8c0c49492 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,5 @@ -SUBDIRS = asn1 util client contrib daemons init install ipaclient ipalib ipaplatform ipapython ipaserver ipatests po +IPACLIENT_SUBDIRS = ipaclient ipalib ipaplatform ipapython +SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaserver ipatests po MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \ ignore_import_errors.pyc ignore_import_errors.pyo \ @@ -166,3 +167,21 @@ jslint-ui-test: jslint-html: cd $(top_srcdir)/install/html; \ jsl -nologo -nosummary -nofilelisting -conf jsl.conf + +.PHONY: bdist_wheel wheel_bundle +WHEELDISTDIR = $(top_builddir)/dist/wheels +WHEELBUNDLEDIR = $(top_builddir)/dist/bundle + +$(WHEELDISTDIR): + mkdir -p $(WHEELDISTDIR) + +$(WHEELBUNDLEDIR): + mkdir -p $(WHEELBUNDLEDIR) + +bdist_wheel: $(WHEELDISTDIR) + for dir in $(IPACLIENT_SUBDIRS); do \ + $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ + done + +wheel_bundle: $(WHEELBUNDLEDIR) bdist_wheel + $(PYTHON) -m pip wheel --wheel-dir $(WHEELBUNDLEDIR) $(WHEELDISTDIR)/*.whl diff --git a/Makefile.python.am b/Makefile.python.am index c9c1a1fc5..2d6285348 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -44,3 +44,9 @@ dist-hook: if test -x "$(srcdir)/$${FILEN}"; then MODE=755; else MODE=644; fi; \ $(INSTALL) -D -m $${MODE} "$(srcdir)/$${FILEN}" "$(distdir)/$${FILEN}" || exit $$?; \ done + +WHEELDISTDIR = $(top_builddir)/dist/wheels +.PHONY: bdist_wheel +bdist_wheel: + rm -rf $(WHEELDISTDIR)/$(pkgname)*.whl + $(PYTHON) "$(srcdir)/setup.py" bdist_wheel --dist-dir=$(WHEELDISTDIR) diff --git a/ipaclient/setup.py b/ipaclient/setup.py index 722d99dfb..fc5609bc3 100644 --- a/ipaclient/setup.py +++ b/ipaclient/setup.py @@ -43,4 +43,18 @@ if __name__ == '__main__': "ipaclient.remote_plugins.2_156", "ipaclient.remote_plugins.2_164", ], + install_requires=[ + "cryptography", + "ipalib", + "ipapython", + "python-nss", + "qrcode", + "six", + ], + setup_requires=[ + "wheel", + ], + extra_requires={ + "otptoken_yubikey": ["yubico", "usb"] + } ) diff --git a/ipalib/setup.py b/ipalib/setup.py index a828c3799..98af7abd1 100644 --- a/ipalib/setup.py +++ b/ipalib/setup.py @@ -36,4 +36,15 @@ if __name__ == '__main__': "ipalib", "ipalib.install", ], + install_requires=[ + "ipaplatform", + "ipapython", + "netaddr", + "pyasn1", + "python-nss", + "six", + ], + setup_requires=[ + "wheel", + ], ) diff --git a/ipaplatform/setup.py b/ipaplatform/setup.py index 82499da21..97311de7f 100644 --- a/ipaplatform/setup.py +++ b/ipaplatform/setup.py @@ -39,4 +39,14 @@ if __name__ == '__main__': "ipaplatform.redhat", "ipaplatform.rhel" ], + install_requires=[ + "cffi", + # "ipalib", # circular dependency + "pyasn1", + "python-nss", + "six", + ], + setup_requires=[ + "wheel", + ], ) diff --git a/ipapython/setup.py b/ipapython/setup.py index 47acdd6f2..0f181ab6a 100755 --- a/ipapython/setup.py +++ b/ipapython/setup.py @@ -38,4 +38,27 @@ if __name__ == '__main__': "ipapython.secrets", "ipapython.install" ], + install_requires=[ + "cffi", + "custodia", + "cryptography", + "dnspython", + "gssapi", + "jwcrypto", + "ipaplatform", + # "ipalib", # circular dependency + "pyldap", + "lxml", + "netaddr", + "netifaces", + "python-nss", + "requests", + "six", + ], + setup_requires=[ + "wheel", + ], + extras_require={ + ":python_version<'3'": ["enum34"], + }, ) diff --git a/ipaserver/setup.py b/ipaserver/setup.py index 8ce2970f2..5c38843b4 100755 --- a/ipaserver/setup.py +++ b/ipaserver/setup.py @@ -43,4 +43,30 @@ if __name__ == '__main__': 'ipaserver.install.plugins', 'ipaserver.install.server', ], + install_requires=[ + "cryptography", + "dbus-python", + "dnspython", + "dogtag-pki", + "ipaclient", + "ipalib", + "ipaplatform", + "ipapython", + "lxml", + "netaddr", + "memcache", + "pyasn1", + "pyldap", + "python-nss", + "six", + # not available on PyPI + # "python-libipa_hbac", + # "python-sss", + # "python-sss-murmur", + # "python-SSSDConfig", + # "samba-python", + ], + setup_requires=[ + "wheel", + ], ) diff --git a/ipasetup.py.in b/ipasetup.py.in index 5eff1aee0..53309560d 100644 --- a/ipasetup.py.in +++ b/ipasetup.py.in @@ -18,6 +18,24 @@ import os import sys +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@', + 'kdcproxy': 'kdcproxy >= 0.3', + 'netifaces': 'netifaces >= 0.10.4', + 'python-nss': 'python-nss >= 0.16', + 'pyldap': 'pyldap >= 2.4.15', + 'qrcode': 'qrcode >= 5.0', + # 'yubico': 'yubico >= 1.2.3', +} + + common_args = dict( version="@VERSION@", license="GPLv3", @@ -56,11 +74,16 @@ old_path = os.path.abspath(os.getcwd()) def ipasetup(name, doc, **kwargs): doclines = doc.split("\n") + install_requires = list(kwargs.pop('install_requires', [])) + for i, entry in enumerate(install_requires): + install_requires[i] = PACKAGE_VERSION.get(entry, entry) + setup_kwargs = common_args.copy() setup_kwargs.update( name=name, description=doclines[0], long_description="\n".join(doclines[:2]), + install_requires=install_requires, **kwargs ) # exclude setup helpers from getting installed diff --git a/ipatests/setup.py b/ipatests/setup.py index 32a520796..ba7a40fa1 100644 --- a/ipatests/setup.py +++ b/ipatests/setup.py @@ -56,5 +56,28 @@ if __name__ == '__main__': 'ipatests.test_pkcs10': ['*.csr'], "ipatests.test_ipaserver": ['data/*'], 'ipatests.test_xmlrpc': ['data/*'], - } + }, + install_requires=[ + "cryptography", + "dbus-python", + "dnspython", + "dogtag-pki", + "ipaclient", + "ipalib", + "ipaplatform", + "ipapython", + "ipaserver", + "lxml", + "nose", + "pyldap", + "pytest", + "python-gssapi", + "python-nss", + "selenium", + "six", + "yaml", + ], + setup_requires=[ + "wheel", + ], ) |