Closed haubourg closed 6 years ago
I wouldn't want a hint to modify the system configuration. It might break other things as side effect. Let's better try to get things right and this package out of the repository (and adjust the shebang?)
in fact, I couldn't have pum work with python 3 without using a virtualenv. So Ok for not adding a hint, but we need to warn that in the docs.
Can you open an issue what's wrong with pum if you are not using a virtualenv? I prefer to fix things rather than documenting workarounds wherever possible.
well, that's more a ubuntu issue by now, I need not pip but pip3 package. But even with that pum install goes well, but I couldn't find the pum exec.
pip3 search pum
returns
pum (0.5.4) - Postgres upgrade manager
INSTALLED: 0.5.4 (latest)
then
regis-> pip3 show -f pum
---
Metadata-Version: 2.0
Name: pum
Version: 0.5.4
Summary: Postgres upgrade manager
Home-page: https://github.com/opengisch/pum
Author: Mario Baranzini
Author-email: mario@opengis.chcd /
Installer: pip
License: UNKNOWN
Location: /home/regis/.local/lib/python3.5/site-packages
Requires: psycopg2, PyYAML
Classifiers:
Topic :: Database
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Intended Audience :: System Administrators
Intended Audience :: Information Technology
Topic :: Software Development :: Version Control
Development Status :: 5 - Production/Stable
Files:
../../../bin/pum
pum-0.5.4.dist-info/DESCRIPTION.rst
pum-0.5.4.dist-info/INSTALLER
pum-0.5.4.dist-info/METADATA
pum-0.5.4.dist-info/RECORD
pum-0.5.4.dist-info/WHEEL
pum-0.5.4.dist-info/metadata.json
pum-0.5.4.dist-info/top_level.txt
pum/__init__.py
pum/__pycache__/__init__.cpython-35.pyc
pum/core/__init__.py
pum/core/__pycache__/__init__.cpython-35.pyc
pum/core/__pycache__/checker.cpython-35.pyc
pum/core/__pycache__/deltapy.cpython-35.pyc
pum/core/__pycache__/dumper.cpython-35.pyc
pum/core/__pycache__/upgrader.cpython-35.pyc
pum/core/checker.py
pum/core/deltapy.py
pum/core/dumper.py
pum/core/upgrader.py
pum/utils/__init__.py
pum/utils/__pycache__/__init__.cpython-35.pyc
pum/utils/__pycache__/utils.cpython-35.pyc
pum/utils/utils.py
But pum does not seem to be in my path anyway:
pum --help
La commande « pum » est introuvable, vouliez-vous dire :
I can run pum check but not any other pum function
(tutorial-env) pulmexa@ubuntu:~/qwat-data-model/update$ ./upgrade_db.sh
CREATE EXTENSION
CREATE EXTENSION
...
Set baseline...OK
Test and upgrade...Dump...ERROR
b'pg_dump: [archiver (db)] connection to database "qwat_dev" failed: could not connect to server: No such file or directory\n\tIs the server running locally and accepting\n\tconnections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?\n'
Check...DIFFERENCES FOUND
tables:
- + ('qwat_sys', 'info')
- + ('qwat_sys', 'logged_relations')
- + ('qwat_sys', 'upgrades')
you qwat_dev service seems wrong. Can you connect to it directly.?
No but we can have a look on it on monday. It's probably simple.
@haubourg, did you install --user
@m-kuhn Uh? What do you mean?
Did you install pum with pip3 install pum --user
or sudo pip3 install pum
?
I did a simple pip3 install pum
I guess that adds the --user
transparently (it doesn't have write access to /bin
without sudo). csn you try the sudo one?
upgrade_db.sh and init_db.sh now warn / exit if pum is not correctly callable.
I can confirm that. Top!
Testing new upgrade_db version fails with python 2, which is generally the default one on most distributions pum. And PUM requires python 3.
Warning + tip could be
By the way, should we keep PUM in 2.X Pip repository ?