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>
This commit is contained in:
Christian Heimes
2016-10-27 14:04:58 +02:00
committed by Martin Basti
parent 6ca96b3db0
commit 8346e1b067
10 changed files with 157 additions and 3 deletions

1
.gitignore vendored
View File

@@ -88,4 +88,3 @@ freeipa2-dev-doc
/ipaplatform/paths.py
/ipaplatform/services.py
/ipaplatform/tasks.py
/ipaplatform/setup.py

View File

@@ -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

View File

@@ -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)

View File

@@ -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"]
}
)

View File

@@ -36,4 +36,15 @@ if __name__ == '__main__':
"ipalib",
"ipalib.install",
],
install_requires=[
"ipaplatform",
"ipapython",
"netaddr",
"pyasn1",
"python-nss",
"six",
],
setup_requires=[
"wheel",
],
)

View File

@@ -39,4 +39,14 @@ if __name__ == '__main__':
"ipaplatform.redhat",
"ipaplatform.rhel"
],
install_requires=[
"cffi",
# "ipalib", # circular dependency
"pyasn1",
"python-nss",
"six",
],
setup_requires=[
"wheel",
],
)

View File

@@ -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"],
},
)

View File

@@ -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",
],
)

View File

@@ -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

View File

@@ -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",
],
)