#6468 Make ipaclient pip install-able
Closed: fixed 6 years ago Opened 7 years ago by cheimes.

FreeIPA git is now using setuptools for packaging. We have most pieces in place to make ipaclient, ipalib, ipaplatform and ipapython pip install-able. With just some small additions and changes we can turn FreeIPA's client packages into proper Python wheel packages. Wheels can be easily installed in virtual envs or containers. Binary wheels with dependencies to shared libraries can be build on one machine, then simply copied and installed on a compatible machine.


The wheel packages won't support client enrolment. They have just enough features to run commands like and to use the FreeIPA's Python API like the RPC client.

part implemented:

master:

  • 2dd66c6 Use correct classifiers to make setup.py files PyPI compatible

master:

  • 8346e1b Add install requirements to Python packages

This commit adds dependency on python-wheel package, which is missing on RHEL/CentOS, therefore IPA can't be built there. Would it be possible to make python-wheel package optional (it would be nice to use new build system and its configure options for disabling)? The traceback is attached:

 make[2]: Entering directory `/builddir/build/BUILD/freeipa-4.4/ipaclient'
cd .; /usr/bin/python setup.py \
    "--verbose" \
    build \
    --build-base "/builddir/build/BUILD/freeipa-4.4/ipaclient/build"
Download error on https://pypi.python.org/simple/wheel/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'wheel' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for wheel
Traceback (most recent call last):
  File "setup.py", line 58, in <module>
    "otptoken_yubikey": ["yubico", "usb"]
  File "/builddir/build/BUILD/freeipa-4.4/ipasetup.py", line 100, in ipasetup
    return setup(**setup_kwargs)
  File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 617, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('wheel')
make[2]: Leaving directory `/builddir/build/BUILD/freeipa-4.4/ipaclient'
make[2]: *** [all-local] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/freeipa-4.4'
RPM build errors:
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.JPDueS (%build)
    Bad exit status from /var/tmp/rpm-tmp.JPDueS (%build)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.5/site-packages/mockbuild/util.py", line 562, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.

I agree with pvomacka. It should be handled as all other non-critical depedencies which are missing in RHEL: By --disable-switch which disables the optional feature.

I have addressed the wheel dependency in https://github.com/freeipa/freeipa/pull/255. The PR is in review.

master:

  • 573eee4 Pylint: whitelist packages with extension modules

master:

  • 526bcea Don't ship install subpackages with wheels

master:

  • ed9645b Adjustments for setup requirements

master:

  • 8559791 Require python-gssapi >= 1.2.0

master:

  • 289982e Require python-cryptography >= 1.3.1

master:

  • 027fc32 Backwards compatibility with setuptools 0.9.8

master:

  • 5dc5960 Require python-gssapi >= 1.2.0, take 2

master:

  • 7f301b0 Adjustments for setup requirements v2

Is everything implemented? I.e., is this ticket fixed?

master:

  • 0663faf fix: regression in API version comparison

master:

  • 987d24f Silence pylint import errors of ipaserver in ipalib and ipaclient

Metadata Update from @cheimes:
- Issue assigned to someone
- Issue set to the milestone: FreeIPA 4.5

7 years ago

Metadata Update from @cheimes:
- Custom field affects_doc reset
- Custom field component reset
- Custom field design reset
- Custom field rhbz reset
- Custom field type reset
- Issue close_status updated to: None
- Issue set to the milestone: None (was: FreeIPA 4.5)

7 years ago

Metadata Update from @cheimes:
- Custom field affects_doc reset
- Issue tagged with: integration

7 years ago

Metadata Update from @pvoborni:
- Custom field affects_doc reset
- Custom field tester adjusted to wanted
- Issue set to the milestone: FreeIPA 4.5

7 years ago

Metadata Update from @mbasti:
- Issue set to the milestone: FreeIPA 4.5.1 (was: FreeIPA 4.5)

7 years ago

master:

  • fe17d18 Constrain wheel package versions

ipa-4-5:

  • 7c93a51 Constrain wheel package versions

Metadata Update from @mbasti:
- Issue set to the milestone: FreeIPA 4.5.2 (was: FreeIPA 4.5.1)

6 years ago

FreeIPA 4.5.1 has been released, moving to FreeIPA 4.5.2 milestone

Metadata Update from @tkrizek:
- Issue set to the milestone: FreeIPA 4.5.3 (was: FreeIPA 4.5.2)

6 years ago

Metadata Update from @tkrizek:
- Issue set to the milestone: FreeIPA 4.5.4 (was: FreeIPA 4.5.3)

6 years ago

Metadata Update from @tkrizek:
- Issue set to the milestone: FreeIPA 4.5.5 (was: FreeIPA 4.5.4)

6 years ago

With ipaclient, ipalib, ipapython, and ipaplatform packaged as wheels, the ticket is done.

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 years ago

master:

ipa-4-7:

master:

  • 2a459ce Make python-ldap optional for PyPI packages
  • d59f155 Make IPADiscovery work without ldap
  • bdce916 Make ipaclient.discovery usable from command line

Login to comment on this ticket.

Metadata