fpm icon indicating copy to clipboard operation
fpm copied to clipboard

could not find setup.py in installable package

Open gmabey opened this issue 1 year ago • 4 comments

I'm able to install this package in a regular pip environment https://github.com/markvincze/sabledocs

However, generating a .deb complains that the setup.py file is missing???

root@1576e366df8b:/# fpm -s python -t deb --python-bin python3 --python-package-name-prefix python3 --log info sabledocs
Setting workdir {:workdir=>"/tmp", :level=>:info}
Trying to download {:package=>"sabledocs", :level=>:info}
Looking in indexes: https://pypi.python.org/simple {:level=>:info}
Collecting sabledocs {:level=>:info}
  Using cached sabledocs-0.7.226.tar.gz (48 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 metadata (pyproject.toml): started {:level=>:info}
  Preparing metadata (pyproject.toml): finished with status 'done' {:level=>:info}
Saved /tmp/package-python-build-e5e505882550644aad47d90059e05db198eabb9b6a3087c36aa44a9355f2/sabledocs-0.7.226.tar.gz {:level=>:info}
Successfully downloaded sabledocs {:level=>:info}
Could not find 'setup.py' {:path=>"/tmp/package-python-build-e5e505882550644aad47d90059e05db198eabb9b6a3087c36aa44a9355f2/sabledocs/sabledocs-0.7.226/setup.py", :level=>:error}
/var/lib/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/python.rb:108:in `input': Unable to find python package; tried /tmp/package-python-build-e5e505882550644aad47d90059e05db198eabb9b6a3087c36aa44a9355f2/sabledocs/sabledocs-0.7.226/setup.py (RuntimeError)
        from /var/lib/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/command.rb:368:in `block in execute'
        from /var/lib/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/command.rb:367:in `each'
        from /var/lib/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/command.rb:367:in `execute'
        from /var/lib/gems/3.1.0/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
        from /var/lib/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/command.rb:591:in `run'
        from /var/lib/gems/3.1.0/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'
        from /var/lib/gems/3.1.0/gems/fpm-1.15.1/bin/fpm:7:in `<top (required)>'
        from /usr/local/bin/fpm:25:in `load'
        from /usr/local/bin/fpm:25:in `<main>'

I don't know enough about python packages to say how that can be ... is this an fpm bug or a sabledocs packaging error??

gmabey avatar Oct 12 '23 21:10 gmabey

See #1982 Unfortunately the work is stale by lack of feedback/reviewers

amdei avatar Nov 19 '23 12:11 amdei

Yep understandable.

gmabey avatar Jan 29 '24 18:01 gmabey

Is this the same underlying issue as is addressed in #2040 ?

gmabey avatar Apr 04 '24 14:04 gmabey

Issue seems to be the same. Although in https://github.com/jordansissel/fpm/pull/1982 I made attempt to solve it via pip wheel, not via build module from PyPA, as suggested in https://github.com/jordansissel/fpm/issues/2040.

amdei avatar Apr 04 '24 21:04 amdei