Permalink
Browse files

Merge branch 'devel'

  • Loading branch information...
dvarrazzo committed May 19, 2012
2 parents 8731f99 + e5559d2 commit 23cf99c78b9224bf2aa9894f41e568670650983c
Showing with 55 additions and 11 deletions.
  1. +8 −0 CHANGES
  2. +3 −0 README.rst
  3. +31 −5 docs/install.rst
  4. +1 −1 pgxnclient/__init__.py
  5. +4 −3 pgxnclient/commands/__init__.py
  6. +7 −1 pgxnclient/commands/install.py
  7. +1 −1 pgxnclient/utils/zip.py
View
@@ -3,6 +3,14 @@
PGXN Client changes log
-----------------------
+pgxnclient 1.0.3
+================
+
+- Can deal with extensions whose ``Makefile`` is created by ``configure``
+ and with makefile not in the package root. Patch provided by Hithoshi
+ Harada (ticket #12).
+
+
pgxnclient 1.0.2
================
View
@@ -34,3 +34,6 @@ degrade gracefully in presence of any package hosted on PGXN.
- Source repository: https://github.com/dvarrazzo/pgxnclient/
- PgFoundry project: http://pgfoundry.org/projects/pgxnclient/
+Please refer to the files in the ``docs`` directory for instructions about
+the program installation and usage.
+
View
@@ -21,8 +21,13 @@ with::
$ sudo easy_install pgxnclient
-The documentation of the tools will also show how to perform a local
-installation.
+To upgrade from a previous version to the most recent available you may run
+instead::
+
+ $ sudo easy_install -U pgxnclient
+
+The documentation of the installation tool of your choice will also show how
+to perform a local installation.
.. __: http://pypi.python.org/pypi/pgxnclient
.. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall
@@ -33,10 +38,31 @@ installation.
Installation from source
------------------------
-The program can be also installed from the source, either from the git
-repository or from a source package: in this case you can install the program
-using::
+The program can also be installed from the source, either from a `source
+package`__ or from the `source repository`__: in this case you can install the
+program using::
$ python setup.py install
+.. __: http://pypi.python.org/pypi/pgxnclient/
+.. __: https://github.com/dvarrazzo/pgxnclient/
+
+
+Running from the project directory
+----------------------------------
+
+You can also run PGXN Client directly from the project directory, either
+unpacked from a `source package`__, or cloned from the `source repository`__,
+without performing any installation.
+
+Just make sure that the project directory is in the :envvar:`PYTHONPATH` and
+run the :program:`bin/pgxn` script::
+
+ $ cd /path/to/pgxnclient
+ $ export PYTHONPATH=`pwd`
+ $ ./bin/pgxn --version
+ pgxnclient 1.0.3.dev0 # just an example
+
+.. __: http://pypi.python.org/pypi/pgxnclient/
+.. __: https://github.com/dvarrazzo/pgxnclient/
View
@@ -6,7 +6,7 @@
# This file is part of the PGXN client
-__version__ = '1.0.2'
+__version__ = '1.0.3'
# Paths where to find the command executables.
# If relative, it's from the `pgxnclient` package directory.
@@ -211,6 +211,7 @@ def popen(self, cmd, *args, **kwargs):
Commands should use this method instead of importing subprocess.Popen:
this allows replacement with a mock in the test suite.
"""
+ logger.debug("running command: %s", cmd)
try:
return Popen(cmd, *args, **kwargs)
except OSError, e:
@@ -458,9 +459,9 @@ def call_pg_config(self, what, _cache={}):
if what in _cache:
return _cache[what]
- cmdline = "%s --%s" % (self.opts.pg_config, what)
- logger.debug("running pg_config with: %s", cmdline)
- p = self.popen(cmdline, stdout=PIPE, shell=True)
+ logger.debug("running pg_config --%s", what)
+ cmdline = [self.opts.pg_config, "--%s" % what]
+ p = self.popen(cmdline, stdout=PIPE)
out, err = p.communicate()
if p.returncode:
raise ProcessError(_("command returned %s: %s")
@@ -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
@@ -236,10 +236,16 @@ def load_sql(self, filename=None, data=None):
cmdline.extend(self.get_psql_options())
# load via pipe to enable psql commands in the file
if not data:
+ logger.debug("loading sql from %s", filename)
fin = open(filename, 'r')
p = self.popen(cmdline, stdin=fin)
p.communicate()
else:
+ if len(data) > 105:
+ tdata = data[:100] + "..."
+ else:
+ tdata = data
+ logger.debug('running sql command: "%s"', tdata)
p = self.popen(cmdline, stdin=PIPE)
p.communicate(data)
View
@@ -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 23cf99c

Please sign in to comment.