all: build lint: pylint3 pgbouncemgr/*.py pytest: python3 setup.py test test: python3 -m unittest run: PYTHONPATH=./ python3 pgbouncemgr/manager.py run-d: PYTHONPATH=./ python3 pgbouncemgr/manager.py --debug run-s: PYTHONPATH=./ python3 pgbouncemgr/manager.py --debug --single-shot run-v: PYTHONPATH=./ python3 pgbouncemgr/manager.py --verbose run-h: PYTHONPATH=./ python3 pgbouncemgr/manager.py -h clean: @/bin/rm -fR dist @/bin/rm -fR deb_dist @/bin/rm -fR build @/bin/rm -fR *.egg-info @/bin/rm -f python3-pgbouncemgr-*.tar.gz @/bin/rm -fR */__pycache__ dist-clean: clean @/bin/rm -fR builds/* runtime-deps: apt-get install python3 python3-psycopg2 pgbouncer # Create the default directory for the state file. mkdir -p /var/lib/pgbouncemgr chown -hR postgres:postgres /var/lib/pgbouncemgr chmod 770 /var/lib/pgbouncemgr chmod 660 /var/lib/pgbouncemgr/* build-deps: runtime-deps # I had to add python-all, even though we're building for # python3. The sstdeb build at some point searches for # that package. Without the package, the build will crash. apt-get install \ pylint3 \ python3-setuptools \ python3-stdeb \ python-all build: clean lint test python3 setup.py --command-packages=stdeb.command bdist_deb mkdir -p builds /bin/rm -f builds/*.deb mv deb_dist/*.deb builds/ make clean > /dev/null upload: build scp builds/*.deb mmakaay1@dpkg.xs4all.net: