-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: "Unexpected directory layout ..." #1860
Comments
@devicenull and @amdei, can y'all help provide any additional info? I do believe this is a bug somewhere in fpm, and learning more about how/why it fails will help in fixing it. Both of the reported cases work for me, unfortunately:
Python version info. I'm testing on Ubuntu 20.04. fpm 1.14.1
|
We're building on Debian 11 - we build in a docker image built like this
And then our build script does
Versions:
|
@devicenull Oh nice! This made it easy to reproduce. Thank you :)
|
I ran this with
the aggregate6 directory is empty, unexpectedly. I think I hvae enough info now to start looking into the issue and hopefully finding a fix. Thank you! |
Ran into this today when building:
|
If it helps, I'm also seeing this same issue: Additionally, with verbose on, pip is returning the following message in regards to upcoming version: |
Downgrading setuptools to 50 does not affect... This means that there are no solution today for generate deb packages( |
Oh, I found solution
The last two points confuse... |
In my opinion the best way is remove easy_install and use pip3 for generating package in folder as issue #1873 suggest It is --target option that can help a lot.
https://pip.pypa.io/en/stable/cli/pip_install/?highlight=target#cmdoption-t |
fwiw - this is what I ended up doing
Which is dumb, but at least I have a working deb (and I've done it in a container so I don't care about the python mess it leaves behind) |
Can confirm the same issue still exists in the latest release of fpm. OS: RHEL 9 x86_64 |
This bit me too. Here's my solution for using a Python source with a deb target on Debian 11. Due to this issue, fpm does not work with pip. Therefore, we have to use easy_install. Installing easy_install on Debian 11 is not easy (pun intended). Notes:
So, we have to install an older version of setuptools. I'll use pip to install the last version before the one in which easy_install was removed. Only do this on volatile systems, like a build container. It could severely f%#* your system.
I am now able to build a package with the following command line:
Off-topic:
This error message is incorrect. The issue is that |
Agreed! FPM could do some more detailed checking to help identify the problem -- checking if it's missing python, or missing a module, etc I wonder, separately, if fpm could try a few different known-default python executable names if "python" doesn't exist, as you noted, only "python3" or "python2" might exist as program names. Thanks for all these extra details. I hope we can resolve this soon :) |
Forked this issue from #1780
Relevant comments for this issue:
Summary: Converting python to deb is failing when using pip.
I'd like to figure out how to reproduce this, or at least dig a little deeper to help me understand where the problem in fpm might be.
Reported cases:
fpm --python-bin python3 --python-package-name-prefix python3 -s python -t deb --python-dis able-dependency py-radix --iteration $CI_PIPELINE_ID aggregate6
fpm -s python -t deb --python-package-name-prefix python3 --python-bin=python3 argparse
The text was updated successfully, but these errors were encountered: