diff --git a/Makefile b/Makefile index 8bf1ea75c2..9f68d63ba6 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,12 @@ setup: # use ansible to ansible ansible commander locally ansible-playbook app_setup/setup.yml --verbose -i "127.0.0.1," -c local -e working_dir=`pwd` +refresh: clean + # update/refresh development environment after pulling new code + python setup.py develop + python manage.py syncdb + python manage.py migrate + adduser: python manage.py createsuperuser @@ -39,7 +45,7 @@ dbchange: # run this each time we make changes to the model python manage.py schemamigration main changes --auto -migrate: +migrate: syncdb # run this to apply changes to the model python manage.py migrate @@ -50,4 +56,9 @@ dbshell: test: python manage.py test main - + +dev_build: + python setup.py dev_build + +release_build: + pythons setup.py release_build diff --git a/lib/settings/production.py b/lib/settings/production.py index e054ef32b3..41d74684d6 100644 --- a/lib/settings/production.py +++ b/lib/settings/production.py @@ -24,16 +24,14 @@ try: local_settings_file = os.path.join(os.path.dirname(__file__), 'local_settings.py') execfile(local_settings_file) - # Hack so that the autoreload will detect changes to local_settings.py. - class dummymodule(str): - __file__ = property(lambda self: self) - sys.modules['local_settings'] = dummymodule(local_settings_file) except IOError: # Otherwise, rely on the global settings file specified in the environment, # defaulting to /etc/ansibleworks/settings.py. + settings_file = os.environ.get('ANSIBLEWORKS_SETTINGS_FILE', + '/etc/ansibleworks/settings.py') try: - settings_file = os.environ.get('ANSIBLEWORKS_SETTINGS_FILE', - '/etc/ansibleworks/settings.py') execfile(settings_file) except IOError: - pass + from django.core.exceptions import ImproperlyConfigured + raise ImproperlyConfigured('No AnsibleWorks configuration found in %s'\ + % settings_file) diff --git a/setup.py b/setup.py index 7da57c37ea..4b2a2e7950 100755 --- a/setup.py +++ b/setup.py @@ -1,21 +1,23 @@ #!/usr/bin/env python -#from distutils.core import setup +import datetime from setuptools import setup, find_packages from lib import __version__ +build_timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M') + setup( - name='ansible-commander', + name='ansibleworks', version=__version__, author='AnsibleWorks, Inc.', author_email='support@ansibleworks.com', - description='Ansible REST API and background job execution.', + description='AnsibleWorks API, UI and Task Engine', long_description=file('README.md', 'rb').read(), license='Proprietary', keywords='ansible', url='http://github.com/ansible/ansible-commander', - packages=['lib'], # FIXME: Rename to acom? + packages=['lib'], # FIXME: Rename to ansibleworks include_package_data=True, zip_safe=False, install_requires=[ @@ -64,12 +66,12 @@ setup( ], entry_points = { 'console_scripts': [ - 'acom-manage = lib:manage', + 'ansibleworks-manage = lib:manage', ], }, options={ 'egg_info': { - 'tag_build': '-dev', + 'tag_build': '-dev%s' % build_timestamp, }, 'aliases': { 'dev_build': 'clean --all egg_info sdist',