Changeset 9f3d193 in rattail-fabdemo


Ignore:
Timestamp:
02/26/18 15:12:37 (2 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Parents:
4d94122
Message:

Replace rattail.fablib with rattail-fabric

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • servers/host/fabfile.py

    r4d94122 r9f3d193  
    1 # -*- coding: utf-8 -*-
     1# -*- coding: utf-8; -*-
    22"""
    33Fabric script for the 'host' server
     
    66"""
    77
    8 from __future__ import unicode_literals
     8from __future__ import unicode_literals, absolute_import
    99
    1010import os
     
    1313from fabric.contrib.files import append, exists
    1414
    15 from rattail.fablib import make_deploy, mkdir, make_system_user, cdvirtualenv, workon
    16 from rattail.fablib import apt, pod, postgresql, python
     15from rattail_fabric import make_deploy, mkdir, make_system_user, cdvirtualenv, workon
     16from rattail_fabric import apt, pod, postgresql, python
    1717
    18 
    19 __all__ = ['bootstrap_all', 'bootstrap_system', 'bootstrap_rattail']
    2018
    2119# Set the 'live' role to the canonical hostname for this server.
     
    2321
    2422deploy = make_deploy(__file__)
    25 
    26 try:
    27     import fabenv
    28 except ImportError as error:
    29     warn("Couldn't import fabenv: {0}".format(error))
    30 
    31 # Set some default env attrs in case fabenv isn't prepped.
    32 if not hasattr(env, 'password_postgresql_rattail'):
    33     setattr(env, 'password_postgresql_rattail', 'password')
    3423
    3524
     
    7665    Bootstrap the Rattail software.
    7766    """
    78     from rattail.fablib.rattail import bootstrap_rattail
     67    from rattail_fabric.rattail import bootstrap_rattail
    7968
    8069    # rattail user and core files
     
    10695        sudo('pip install --upgrade --editable .')
    10796
     97    # # rattail-demo source
     98    # with cdvirtualenv('rattail', 'src'):
     99    #     if not exists('rattail-demo'):
     100    #         sudo('git clone https://rattailproject.org/git/rattail-demo.git')
     101    # with cdvirtualenv('rattail', 'src/rattail-demo'):
     102    #     sudo('git pull')
     103    #     sudo('pip install --upgrade --editable .')
     104
    108105    # config
    109106    with cdvirtualenv('rattail', 'app'):
     
    131128    deploy('rattail/rattail.localhost.conf', '/etc/apache2/sites-available/000-default.conf')
    132129    sudo('service apache2 restart')
     130
     131
     132##############################
     133# fabenv
     134##############################
     135
     136try:
     137    import fabenv
     138except ImportError as error:
     139    warn("Couldn't import fabenv: {}".format(error))
     140
     141# Set some default env attrs in case fabenv isn't prepped.
     142if not hasattr(env, 'password_postgresql_rattail'):
     143    setattr(env, 'password_postgresql_rattail', 'password')
  • setup.py

    r4d94122 r9f3d193  
    1 # -*- coding: utf-8 -*-
     1# -*- coding: utf-8; -*-
    22"""
    33Setup script for Rattail Fabric Demo
    44"""
    55
    6 from __future__ import unicode_literals
     6from __future__ import unicode_literals, absolute_import
    77
    88import os
     
    4545
    4646    'Fabric',                           # 1.10.2
    47     'rattail',                          # 0.5.9
    48     ]
     47    'rattail-fabric',                   # 0.1.0
     48]
    4949
    5050
     
    7070        'Topic :: Office/Business',
    7171        'Topic :: Software Development :: Libraries :: Python Modules',
    72         ],
     72    ],
    7373
    7474    install_requires = requires,
    7575    packages = find_packages(),
    76     )
     76)
Note: See TracChangeset for help on using the changeset viewer.