Support for remote Py3
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Tue, 30 Sep 2014 13:26:34 +0000 (15:26 +0200)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Tue, 30 Sep 2014 13:27:10 +0000 (15:27 +0200)
fnpdeploy/__init__.py
setup.py

index dc74699..f9c6561 100644 (file)
@@ -224,6 +224,7 @@ def install_requirements():
     require('release', provided_by=[deploy])
     require('app_path')
     if not files.exists('%(app_path)s/ve' % env):
     require('release', provided_by=[deploy])
     require('app_path')
     if not files.exists('%(app_path)s/ve' % env):
+        # HERE: maybe venv?
         require('virtualenv')
         run('%(virtualenv)s %(app_path)s/ve' % env, pty=True)
     with cd('%(app_path)s/releases/%(release)s' % env):
         require('virtualenv')
         run('%(virtualenv)s %(app_path)s/ve' % env, pty=True)
     with cd('%(app_path)s/releases/%(release)s' % env):
@@ -234,7 +235,11 @@ def install_requirements():
             'django.db.backends.postgresql_psycopg2': 'psycopg2',
             'django.db.backends.mysql': 'MySQL-python',
         }
             'django.db.backends.postgresql_psycopg2': 'psycopg2',
             'django.db.backends.mysql': 'MySQL-python',
         }
-        databases = run('''DJANGO_SETTINGS_MODULE=%(project_name)s.settings %(app_path)s/ve/bin/python -c 'from django.conf import settings;              print " ".join(set([d["ENGINE"] for d in settings.DATABASES.values()]))' ''' % env)
+        databases = run(
+            'DJANGO_SETTINGS_MODULE=%(project_name)s.settings '
+            '%(app_path)s/ve/bin/python -c \''
+            'from django.conf import settings;'
+            'print(" ".join(set([d["ENGINE"] for d in settings.DATABASES.values()])))\'' % env)
         for database in databases.split():
             if database in database_reqs:
                 # TODO: set pip default pypi
         for database in databases.split():
             if database in database_reqs:
                 # TODO: set pip default pypi
index 26c80b3..71c4a88 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ else:
 
 setup(
     name='fnpdeploy',
 
 setup(
     name='fnpdeploy',
-    version='0.2',
+    version='0.2.1',
     author='Radek Czajka',
     author_email='radekczajka@nowoczesnapolska.org.pl',
     url = '',
     author='Radek Czajka',
     author_email='radekczajka@nowoczesnapolska.org.pl',
     url = '',