ipaserver: remove ipalib import from setup.py

Instead of importing ipalib to get IPA version string, create setup.py from
a template and have the version string automatically filled in.

This makes it possible to build the ipaserver package without having to
have ipalib dependencies installed.

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta 2016-08-24 12:52:08 +02:00 committed by David Kupka
parent 0d370a959b
commit 0b91735c79
2 changed files with 6 additions and 8 deletions

View File

@ -75,10 +75,6 @@ BuildRequires: nspr-devel
BuildRequires: nss-devel
BuildRequires: openssl-devel
BuildRequires: libuuid-devel
BuildRequires: python-ldap
BuildRequires: python-netaddr
BuildRequires: python-gssapi
BuildRequires: python-dns
BuildRequires: libsss_idmap-devel
# 1.14.0: sss_nss_getnamebycert (https://fedorahosted.org/sssd/ticket/2897)
BuildRequires: libsss_nss_idmap-devel >= 1.14.0
@ -86,25 +82,29 @@ BuildRequires: rhino
BuildRequires: libverto-devel
BuildRequires: libunistring-devel
BuildRequires: python-lesscpy
BuildRequires: python-six
BuildRequires: python-netifaces
%endif # ONLY_CLIENT
#
# Build dependencies for makeapi/makeaci
#
BuildRequires: krb5-workstation
BuildRequires: python-ldap
BuildRequires: python-setuptools
BuildRequires: python-nss
# 0.6: serialization.load_pem_private_key, load_pem_public_key
BuildRequires: python-cryptography >= 0.6
BuildRequires: python-netaddr
BuildRequires: python-gssapi
BuildRequires: python-libipa_hbac
BuildRequires: python-memcached
BuildRequires: python-lxml
BuildRequires: python-pyasn1
BuildRequires: python-dns
# pki Python package
BuildRequires: pki-base
BuildRequires: python-six
BuildRequires: dbus-python
BuildRequires: python-netifaces
BuildRequires: python-libsss_nss_idmap
BuildRequires: python-cffi

View File

@ -28,14 +28,12 @@ import sys
# include ../ for ipasetup.py and ipalib
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import ipalib # noqa: E402
from ipasetup import ipasetup # noqa: E402
ipasetup(
name='freeipa',
doc=__doc__,
version=ipalib.__version__,
package_dir={'ipaserver': ''},
packages=[
'ipaserver',