Bug 1278605
Summary: | [RFE] support installing beaker-client through pip | ||
---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Dan Callaghan <dcallagh> |
Component: | command line | Assignee: | Dan Callaghan <dcallagh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 21 | CC: | dcallagh, dowang, mjia, rjoost |
Target Milestone: | 24.0 | Keywords: | FutureFeature, Patch, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-02-21 18:50:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dan Callaghan
2015-11-05 23:36:27 UTC
(In reply to Dan Callaghan from comment #0) > This is desirable because it makes the client usable on non-RPM-based > platforms. ... and also in virtualenvs (even on RPM-based platforms) which is also useful for some people. (In reply to Dan Callaghan from comment #0) > * ideally remove Client's dependency on Common to avoid messing around with > that extra package (there should be little to nothing in Common which is > really needed by Client) This is not too easy, since client relies heavily on HubProxy (so does the LC code). But it should be no problem to just upload beaker-common to PyPI as well. (In reply to Dan Callaghan from comment #0) > * make Client/setup.py not try to create empty /etc/beaker Can't remember why I wrote this... It doesn't seem to cause any harm as is. I do notice that inside a virtualenv pip does not install package_data to the proper absolute path (because it can't, I guess) so the bash completion script ends up in ./lib/python2.7/site-packages/usr/share/bash-completion/completions/bkr which is useless, but not particularly harmful. With this patch: http://gerrit.beaker-project.org/5390 I can upload beaker-common and beaker-client to PyPI (tested using TestPyPI) and then successfully run `pip install beaker-client` inside a virtualenv. However the bkr client fails with: ImportError: No module named libxml2 since it wants to import libxml2-python and libxslt-python bindings. Those aren't available from PyPI so they aren't declared as requirements in setup.py, they have to be installed from the native libxml2 package. (This is the eternal problem with Python-level packaging and why I don't think anyone should bother with it.) (In reply to Dan Callaghan from comment #6) > However the bkr client fails with: > > ImportError: No module named libxml2 The way to avoid this seems to be to create the virtual env using `virtualenv --system-site-packages` and then ensure that libxml2-python and libxslt-python system packages are installed. I have used the above patch to upload beaker-common and beaker-client version 23.2 (and today also 23.3) to PyPI. Steps to verify: 1. virtualenv --system-site-packages asdf 2. cd asdf 3. source bin/activate 4. pip install beaker-client 5. bkr whoami Beaker 24.0 has been released. |