mirror of https://github.com/dbcli/pgcli
Small developer improvements for Windows-based devs.
This commit is contained in:
parent
94df104d7d
commit
79df61f674
36
DEVELOP.rst
36
DEVELOP.rst
|
@ -48,6 +48,10 @@ Create a virtualenv (let's call it pgcli-dev). Activate it:
|
||||||
|
|
||||||
source ./pgcli-dev/bin/activate
|
source ./pgcli-dev/bin/activate
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
.\pgcli-dev\scripts\activate (for Windows)
|
||||||
|
|
||||||
Once the virtualenv is activated, `cd` into the local clone of pgcli folder
|
Once the virtualenv is activated, `cd` into the local clone of pgcli folder
|
||||||
and install pgcli using pip as follows:
|
and install pgcli using pip as follows:
|
||||||
|
|
||||||
|
@ -73,6 +77,37 @@ If you want to work on adding new meta-commands (such as `\dp`, `\ds`, `dy`),
|
||||||
you need to contribute to `pgspecial <https://github.com/dbcli/pgspecial/>`_
|
you need to contribute to `pgspecial <https://github.com/dbcli/pgspecial/>`_
|
||||||
project.
|
project.
|
||||||
|
|
||||||
|
Visual Studio Code Debugging
|
||||||
|
-----------------------------
|
||||||
|
To set up Visual Studio Code to debug pgcli requires a launch.json file.
|
||||||
|
|
||||||
|
Within the project, create a file: .vscode\\launch.json like below.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Module",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "pgcli.main",
|
||||||
|
"justMyCode": false,
|
||||||
|
"console": "externalTerminal",
|
||||||
|
"env": {
|
||||||
|
"PGUSER": "postgres",
|
||||||
|
"PGPASS": "password",
|
||||||
|
"PGHOST": "localhost",
|
||||||
|
"PGPORT": "5432"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
Building RPM and DEB packages
|
Building RPM and DEB packages
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
@ -145,6 +180,7 @@ service for the changes to take effect.
|
||||||
$ sudo service postgresql restart
|
$ sudo service postgresql restart
|
||||||
|
|
||||||
After that, tests in the ``/pgcli/tests`` directory can be run with:
|
After that, tests in the ``/pgcli/tests`` directory can be run with:
|
||||||
|
(Note that these ``behave`` tests do not currently work when developing on Windows due to pexpect incompatibility.)
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ Bug fixes:
|
||||||
|
|
||||||
* Fix exception when retrieving password from keyring ([issue 1338](https://github.com/dbcli/pgcli/issues/1338)).
|
* Fix exception when retrieving password from keyring ([issue 1338](https://github.com/dbcli/pgcli/issues/1338)).
|
||||||
* Fix using comments with special commands ([issue 1362](https://github.com/dbcli/pgcli/issues/1362)).
|
* Fix using comments with special commands ([issue 1362](https://github.com/dbcli/pgcli/issues/1362)).
|
||||||
|
* Small improvements to the Windows developer experience
|
||||||
|
|
||||||
Internal:
|
Internal:
|
||||||
---------
|
---------
|
||||||
|
|
|
@ -2,7 +2,7 @@ pytest>=2.7.0
|
||||||
tox>=1.9.2
|
tox>=1.9.2
|
||||||
behave>=1.2.4
|
behave>=1.2.4
|
||||||
black>=22.3.0
|
black>=22.3.0
|
||||||
pexpect==3.3
|
pexpect==3.3; platform_system != "Windows"
|
||||||
pre-commit>=1.16.0
|
pre-commit>=1.16.0
|
||||||
coverage>=5.0.4
|
coverage>=5.0.4
|
||||||
codecov>=1.5.1
|
codecov>=1.5.1
|
||||||
|
@ -10,3 +10,4 @@ docutils>=0.13.1
|
||||||
autopep8>=1.3.3
|
autopep8>=1.3.3
|
||||||
twine>=1.11.0
|
twine>=1.11.0
|
||||||
wheel>=0.33.6
|
wheel>=0.33.6
|
||||||
|
sshtunnel>=0.4.0
|
5
setup.py
5
setup.py
|
@ -26,6 +26,11 @@ install_requirements = [
|
||||||
# so we'll only install it if we're not in Windows.
|
# so we'll only install it if we're not in Windows.
|
||||||
if platform.system() != "Windows" and not platform.system().startswith("CYGWIN"):
|
if platform.system() != "Windows" and not platform.system().startswith("CYGWIN"):
|
||||||
install_requirements.append("setproctitle >= 1.1.9")
|
install_requirements.append("setproctitle >= 1.1.9")
|
||||||
|
|
||||||
|
# Windows will require the binary psycopg to run pgcli
|
||||||
|
if platform.system() == "Windows":
|
||||||
|
install_requirements.append("psycopg-binary >= 3.0.14")
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pgcli",
|
name="pgcli",
|
||||||
|
|
Loading…
Reference in New Issue