Permalink
Browse files

Always expand the path for the setup.py file

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.
  • Loading branch information...
zllak committed Mar 21, 2012
1 parent a4b8f25 commit ba2104923c8b63cf0d01a3889325334ec1540988
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/fpm/package/python.rb
@@ -65,6 +65,7 @@ def input(package)
else
setup_py = path_to_package
end
+ setup_py = File.expand_path(setup_py)
if !File.exists?(setup_py)
@logger.error("Could not find 'setup.py'", :path => setup_py)

0 comments on commit ba21049

Please sign in to comment.