Description of problem: The bodhi client fails to run if bodhi-server is not installed, as it is missing the Python distribution that gets installed by the server package. Version-Release number of selected component (if applicable): bodhi-client-2.1.8-1.fc26.noarch How reproducible: Every time. Steps to Reproduce: 0. Install bodhi-client but not bodhi-server. 1. $ bodhi Actual results: $ bodhi Traceback (most recent call last): File "/usr/bin/bodhi", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2958, in <module> @_call_aside File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2944, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2971, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 635, in _build_master ws.require(__requires__) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 943, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 829, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'bodhi==2.1.8' distribution was not found and is required by the application Expected results: bodhi-client should function without the server installed.
> I think I will add a bodhi-common package that will own the distribution bits, which should allow bodhi-client to be installed independently of the server. The package with the python module should be called python2-bodhi, since it's a normal shared python module. That's what the packaging guidelines specify for names, and also there won't be a conflict when python3-bodhi is added later on.
Hello Zbigniew, I had actually been calling it python2-bodhi-common in my spec file while working on this, but I like your suggestion better. Thanks!
Fedora naming standard for python packages is: source: python-%{pypi_name} py2 bin: python2-%{pypi_name} py3 bin: python3-%{pypi_name}
I tried to fix this in the spec file, but I came to realize that bodhi/__init__.py contains server code, which makes it impossible to put that file in the python2-bodhi package without pulling in all of the server. Due to this, I've decided to fix this upstream by reorganizing the code.