-
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
Always expand the path for the setup.py file #180
Conversation
As we chdir in the setup.py base directory, we need to be sure to have an absolute path. If we have a relative path, after chdir in the base dir, the command to get metadata will fail. And if we remove the chdir, some setup.py file open "local" file (i.e README files). So, to be sure that the command will run, after chdir, we need to use the absolute path.
This is a bug, what should be happening is:
Expanding the path shouldn't matter as it should always look at the local setup.py after chdir'ing. I'll take a peak. |
Confirmed:
|
In this case, the setup.py in the command must always be "setup.py", with no path ? |
inside fpm, yeah, it should chdir to the target directory, then run 'python setup.py ...' It's a bug in this case that it is not doing this. |
So I guess in |
After the fix:
|
Great, thanks ! :) |
fpm 0.4.3 is up! Thanks much for spending the energy to debug and provide a patch :) |
Thank you for maintaining such a great project ! |
As we chdir in the setup.py base directory, we need to be sure to have
an absolute path. If we have a relative path, after chdir in the base
dir, the command to get metadata will fail. And if we remove the chdir,
some setup.py file open "local" file (i.e README files). So, to be sure
that the command will run, after chdir, we need to use the absolute
path.
The bug can be reproduced when building a python package from a directory.
Download a package tarball from PyPI, extract the source, and in the same
directory, build using fpm:
wget http://...../celery-2.5.0.tar.gz
tar zxvf celery-2.5.0.tar.gz
fpm -s python -t deb celery-2.5.0
This was making fpm resolve the setup.py to "celery-2.5.0/setup.py", and then, chdir into celery-2.5.0 directory and running the command, which was looking for celery-2.5.0/setup.py, which fails.
If you have any comment ! :)