summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2015-10-23 02:49:20 -0700
committerAmjith Ramanujam <amjith.r@gmail.com>2015-10-23 02:49:20 -0700
commitcc7b9d2d56ea453a06f2dcf1ffff320f9b8c47a5 (patch)
treecb1f54b56957ae38555b5cacb4b34f919681e2ad /setup.py
parentd9c62b0925023ce3f255113dd22d615c94a71a05 (diff)
Make setproctitle optional in Windows
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index 835c5bea..7198ef8f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
import re
import ast
+import platform
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
@@ -10,6 +11,23 @@ with open('pgcli/__init__.py', 'rb') as f:
description = 'CLI for Postgres Database. With auto-completion and syntax highlighting.'
+install_requirements = [
+ 'pgspecial>=1.1.0',
+ 'click >= 4.1',
+ 'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
+ 'prompt_toolkit==0.46',
+ 'psycopg2 >= 2.5.4',
+ 'sqlparse == 0.1.16',
+ 'configobj >= 5.0.6',
+ ]
+
+
+# setproctitle is used to mask the password when running `ps` in command line.
+# But this is not necessary in Windows since the password is never shown in the
+# task manager. Also setproctitle is a hard dependency to install in Windows,
+# so we'll only install it if we're not in Windows.
+if platform.system() != 'Windows':
+ install_requirements.append('setproctitle >= 1.1.9')
setup(
name='pgcli',
@@ -23,16 +41,7 @@ setup(
'packages/pgliterals/pgliterals.json']},
description=description,
long_description=open('README.rst').read(),
- install_requires=[
- 'pgspecial>=1.1.0',
- 'click >= 4.1',
- 'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
- 'prompt_toolkit==0.46',
- 'psycopg2 >= 2.5.4',
- 'sqlparse == 0.1.16',
- 'configobj >= 5.0.6',
- 'setproctitle >= 1.1.9'
- ],
+ install_requires=install_requirements,
entry_points='''
[console_scripts]
pgcli=pgcli.main:cli