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

Python library distro==1.8.0 does not work with fpm #1786

Open
spkane opened this issue Oct 20, 2022 · 1 comment
Open

Python library distro==1.8.0 does not work with fpm #1786

spkane opened this issue Oct 20, 2022 · 1 comment

Comments

@spkane
Copy link

spkane commented Oct 20, 2022

Python library distro==1.8.0 does not work with fpm and therefore breaks the build-scripts/ubuntu-2004/build-3rd-parties.sh script, without first doing something like this:

sed -i 's|build_from_pypi distro|build_from_pypi distro 1.7.0|g' ./build-scripts/ubuntu-2004/build-3rd-parties.sh

It appears that this is due to the removal of setup.py which fpm requires. Some projects appear to be trying to replace fpm with https://github.com/upciti/wheel2deb as a solution.

Setting workdir {:workdir=>"/tmp", :level=>:info}
Trying to download {:package=>"distro==1.8.0", :level=>:info}
Looking in indexes: https://pypi.python.org/simple {:level=>:info}
Collecting distro==1.8.0 {:level=>:info}
  Downloading distro-1.8.0.tar.gz (59 kB) {:level=>:info}
  Installing build dependencies: started {:level=>:info}
  Installing build dependencies: finished with status 'done' {:level=>:info}
  Getting requirements to build wheel: started {:level=>:info}
  Getting requirements to build wheel: finished with status 'done' {:level=>:info}
  Installing backend dependencies: started {:level=>:info}
  Installing backend dependencies: finished with status 'done' {:level=>:info}
    Preparing wheel metadata: started {:level=>:info}
    Preparing wheel metadata: finished with status 'done' {:level=>:info}
  Saved /tmp/package-python-build-452058962fc46ba2303901fec14a23b90deb4f24c59c4fdced87bef6ba91/distro-1.8.0.tar.gz {:level=>:info}
Successfully downloaded distro {:level=>:info}
Could not find 'setup.py' {:path=>"/tmp/package-python-build-452058962fc46ba2303901fec14a23b90deb4f24c59c4fdced87bef6ba91/distro==1.8.0/distro/setup.py", :level=>:error}
Traceback (most recent call last):
	9: from /usr/local/bin/fpm:23:in `<main>'
	8: from /usr/local/bin/fpm:23:in `load'
	7: from /var/lib/gems/2.7.0/gems/fpm-1.14.2/bin/fpm:7:in `<top (required)>'
	6: from /var/lib/gems/2.7.0/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'
	5: from /var/lib/gems/2.7.0/gems/fpm-1.14.2/lib/fpm/command.rb:574:in `run'
	4: from /var/lib/gems/2.7.0/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
	3: from /var/lib/gems/2.7.0/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `execute'
	2: from /var/lib/gems/2.7.0/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `each'
	1: from /var/lib/gems/2.7.0/gems/fpm-1.14.2/lib/fpm/command.rb:352:in `block in execute'
/var/lib/gems/2.7.0/gems/fpm-1.14.2/lib/fpm/package/python.rb:108:in `input': Unable to find python package; tried /tmp/package-python-build-452058962fc46ba2303901fec14a23b90deb4f24c59c4fdced87bef6ba91/distro==1.8.0/distro/setup.py (RuntimeError)
@WadeBarnes
Copy link
Member

#1787 fixes the immediate issue reported here. Long term we'll have to look into aligning with the new setuptools recommendations, as noted in the distro v1.8.0 release, and the use of https://github.com/upciti/wheel2deb as noted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants