Browse files

Fix small bugs around the directory/file install.

For the directory install, if the path is relative and the
extension expects to run configure, the path to configure
is bogus as the subprocess runs the extension directory.
For the file install, if the extension expects to run
configure before make, Makefile does not necessarily exit,
so discerning the extension's directory by any of 'Makefile',
'makefile' or 'GNUMakefile' was not enough.
  • Loading branch information...
1 parent a683550 commit 0493341a500bbca448174cfb73ad3795d5063d1d @umitanuki umitanuki committed May 9, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 pgxnclient/commands/
  2. +1 −1 pgxnclient/utils/
@@ -96,7 +96,7 @@ def run(self):
def _run(self, dir):
spec = self.get_spec()
if spec.is_dir():
- pdir = spec.dirname
+ pdir = os.path.abspath(spec.dirname)
elif spec.is_file():
pdir = self.unpack(spec.filename, dir)
else: # download
@@ -62,7 +62,7 @@ def unpack(zipname, destdir):
# directory, so return the first dir we found containing a Makefile,
# alternatively just return the unpacked dir
for dir in os.listdir(destdir):
- for fn in ('Makefile', 'makefile', 'GNUmakefile'):
+ for fn in ('Makefile', 'makefile', 'GNUmakefile', 'configure'):
if os.path.exists(os.path.join(destdir, dir, fn)):
return os.path.join(destdir, dir)

0 comments on commit 0493341

Please sign in to comment.