Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in setup.py in bodhi-client-3.3.0 #2401

Closed
tkdchen opened this issue May 31, 2018 · 7 comments · Fixed by #4081
Closed

Error in setup.py in bodhi-client-3.3.0 #2401

tkdchen opened this issue May 31, 2018 · 7 comments · Fixed by #4081
Labels
Client Issues with the bodhi command line interface tool Crash Issues related to an unhandled crash High priority These issues are higher priority than normal

Comments

@tkdchen
Copy link
Contributor

tkdchen commented May 31, 2018

Got this error by pip install.

pip install "bodhi-client>=2.0,<4"
Collecting bodhi-client<4,>=2.0
  Downloading https://files.pythonhosted.org/packages/d3/8e/ce082026aca1e337a317c44c44c4834c7d6f7de05948c18f427ea1411026/bodhi-client-3.3.0.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/bodhi.egg-info
    writing pip-egg-info/bodhi.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/bodhi.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/bodhi.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/bodhi.egg-info/SOURCES.txt'
    package init file 'bodhi/__init__.py' not found (or not a regular file)
    reading manifest file 'pip-egg-info/bodhi.egg-info/SOURCES.txt'
    writing manifest file 'pip-egg-info/bodhi.egg-info/SOURCES.txt'
    running egg_info
    creating pip-egg-info/bodhi_client.egg-info
    writing requirements to pip-egg-info/bodhi_client.egg-info/requires.txt
    writing pip-egg-info/bodhi_client.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/bodhi_client.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/bodhi_client.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/bodhi_client.egg-info/entry_points.txt
    writing manifest file 'pip-egg-info/bodhi_client.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/bodhi_client.egg-info/SOURCES.txt'
    reading manifest template 'CLIENT_MANIFEST.in'
    writing manifest file 'pip-egg-info/bodhi_client.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-quDnNB/bodhi-client/setup.py", line 127, in <module>
        server_packages.remove('bodhi')
    ValueError: list.remove(x): x not in list
@tkdchen
Copy link
Contributor Author

tkdchen commented May 31, 2018

This also happens in bodhi-client-2.9.0

@bowlofeggs bowlofeggs added Client Issues with the bodhi command line interface tool Crash Issues related to an unhandled crash labels May 31, 2018
@tkdchen
Copy link
Contributor Author

tkdchen commented Jun 1, 2018

I tried to add

if 'bodhi' in server_packages:
    server_packages.remove('bodhi')

The crash is fixed but it causes another problem, e.g. pip install bodhi-client-3.7.0.tar.gz, bodhi-server is to be installed and only it, no bodhi-client is installed.

How about use extra_require for bodhi-server and bodhi-client? Or split bodhi/client and bodhi/server into separate Python packages with their own setup.py?

@tkdchen
Copy link
Contributor Author

tkdchen commented Sep 2, 2018

May I ask is there any reason to call setup three times to create bodhi, bodhi-client and bodhi-server tarballs separately?

I'm also thinking of a new layout of source code in order to install bodhi-client and bodhi-server easily that could fix this issue. Initial idea is:

  • client, server and bodhi common files move into separate subpackages with their own package files, e.g. setup.py, MANIFEST.in, etc.

  • an alternative one is to distribute bodhi source tarball by including everything inside the source tree, which allows developers to get a copy of complete source code from tarball. As a result, there is only one bodhi package which installed client, server and common files together, whose dependent packages are listed as extra list individually. So, client could be installed by bodhi[client], and server could be installed by bodhi[server].

What do you think?

@bowlofeggs
Copy link
Contributor

Yeah I've been thinking about changing this for a while. The way I'm using setup.py is certainly not the way it's intended to be used, and it does cause some issues as you've noted.

@tkdchen can you explain that second proposal a bit more? I'm not sure I follow.

Giving them each their own subpackage is reasonable I think.

@tkdchen
Copy link
Contributor Author

tkdchen commented Oct 22, 2018

@bowlofeggs The second one is to use setuptools extras_require. Personally, I prefer the first proposal.

@kparal
Copy link
Contributor

kparal commented Jan 15, 2019

I see the same error when trying to install bodhi-client-3.11.0 from pypi:

$ virtualenv envtest
Using base prefix '/usr'
New python executable in /home/kparal/devel/taskotron/libtaskotron/envtest/bin/python3
Also creating executable in /home/kparal/devel/taskotron/libtaskotron/envtest/bin/python
Installing setuptools, pip, wheel...
done.

$ source envtest/bin/activate

$ pip install bodhi-client
Collecting bodhi-client
  Downloading https://files.pythonhosted.org/packages/97/f7/3e764782773915bd8a6254663c6d3f0d28a2954a78f7bdeb9a04797c7d54/bodhi-client-3.11.0.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/bodhi.egg-info
    writing pip-egg-info/bodhi.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/bodhi.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/bodhi.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/bodhi.egg-info/SOURCES.txt'
    package init file 'bodhi/__init__.py' not found (or not a regular file)
    reading manifest file 'pip-egg-info/bodhi.egg-info/SOURCES.txt'
    writing manifest file 'pip-egg-info/bodhi.egg-info/SOURCES.txt'
    running egg_info
    creating pip-egg-info/bodhi_client.egg-info
    writing pip-egg-info/bodhi_client.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/bodhi_client.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/bodhi_client.egg-info/entry_points.txt
    writing requirements to pip-egg-info/bodhi_client.egg-info/requires.txt
    writing top-level names to pip-egg-info/bodhi_client.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/bodhi_client.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/bodhi_client.egg-info/SOURCES.txt'
    reading manifest template 'CLIENT_MANIFEST.in'
    writing manifest file 'pip-egg-info/bodhi_client.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-07z_afee/bodhi-client/setup.py", line 123, in <module>
        server_packages.remove('bodhi')
    ValueError: list.remove(x): x not in list
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-07z_afee/bodhi-client/

This is a blocker for us in Taskotron test suite when trying to transition from python-fedora to bodhi-client. Can this be fixed soon, please?

@TomasTomecek
Copy link
Contributor

In our case, I " solved " this by skipping the test in tox and running it when invoked directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Issues with the bodhi command line interface tool Crash Issues related to an unhandled crash High priority These issues are higher priority than normal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants