summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Church <chris@ninemoreminutes.com>2013-05-03 06:14:14 +0200
committerChris Church <chris@ninemoreminutes.com>2013-05-08 00:17:04 +0200
commit75ea4a1cdae0bf676b55b634b2192b090f3ed3b7 (patch)
tree9a7f710c269101ae9f1c7ddce3454b04958d5494
parentAdd variable data to admin. (diff)
downloadawx-75ea4a1cdae0bf676b55b634b2192b090f3ed3b7.tar.xz
awx-75ea4a1cdae0bf676b55b634b2192b090f3ed3b7.zip
Initial setup script.
-rw-r--r--MANIFEST.in9
-rw-r--r--lib/__init__.py15
-rwxr-xr-xmanage.py8
-rwxr-xr-xsetup.py79
4 files changed, 105 insertions, 6 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000000..86bc71cd67
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,9 @@
+recursive-include lib *.py
+recursive-include lib/static *.ico
+recursive-include lib/templates *.html
+recursive-exclude lib/settings local_settings.py
+include *.py *.txt *.md
+include MANIFEST.in
+include COPYING
+prune lib/public
+prune lib/project
diff --git a/lib/__init__.py b/lib/__init__.py
index 3293f9412b..d591e30ac7 100644
--- a/lib/__init__.py
+++ b/lib/__init__.py
@@ -14,3 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with Ansible Commander. If not, see <http://www.gnu.org/licenses/>.
+
+__version__ = '1.2-b1'
+
+import os
+import sys
+
+__all__ = ['__version__']
+
+def manage():
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lib.settings')
+ from django.core.management import execute_from_command_line
+ if len(sys.argv) >= 2 and sys.argv[1] in ('version', '--version'):
+ sys.stdout.write('acom-%s\n' % __version__)
+ else:
+ execute_from_command_line(sys.argv)
diff --git a/manage.py b/manage.py
index 2e5a5476dd..866aa7cf9b 100755
--- a/manage.py
+++ b/manage.py
@@ -1,9 +1,5 @@
#!/usr/bin/env python
-import os
-import sys
-
if __name__ == '__main__':
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lib.settings')
- from django.core.management import execute_from_command_line
- execute_from_command_line(sys.argv)
+ from lib import manage
+ manage()
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000000..7da57c37ea
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+#from distutils.core import setup
+from setuptools import setup, find_packages
+
+from lib import __version__
+
+setup(
+ name='ansible-commander',
+ version=__version__,
+ author='AnsibleWorks, Inc.',
+ author_email='support@ansibleworks.com',
+ description='Ansible REST API and background job execution.',
+ long_description=file('README.md', 'rb').read(),
+ license='Proprietary',
+ keywords='ansible',
+ url='http://github.com/ansible/ansible-commander',
+ packages=['lib'], # FIXME: Rename to acom?
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=[
+ 'Django>=1.5',
+ 'django-celery',
+ 'django-devserver',
+ 'django-extensions',
+ 'django-filter',
+ 'django-jsonfield',
+ 'djangorestframework',
+ 'pexpect',
+ 'python-dateutil',
+ 'PyYAML',
+ 'South',
+ ],
+ setup_requires=[],
+ #tests_require=[
+ # 'Django>=1.5',
+ # 'django-celery',
+ # 'django-devserver',
+ # 'django-extensions',
+ # 'django-filter',
+ # 'django-jsonfield',
+ # 'django-setuptest',
+ # 'djangorestframework',
+ # 'pexpect',
+ # 'python-dateutil',
+ # 'PyYAML',
+ # 'South',
+ #],
+ #test_suite='test_suite.TestSuite',
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
+ 'Framework :: Django',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: Information Technology',
+ 'Intended Audience :: System Administrators'
+ 'License :: Other/Proprietary License',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Operating System :: POSIX',
+ 'Programming Language :: Python',
+ 'Topic :: System :: Installation/Setup',
+ 'Topic :: System :: Systems Administration',
+ ],
+ entry_points = {
+ 'console_scripts': [
+ 'acom-manage = lib:manage',
+ ],
+ },
+ options={
+ 'egg_info': {
+ 'tag_build': '-dev',
+ },
+ 'aliases': {
+ 'dev_build': 'clean --all egg_info sdist',
+ 'release_build': 'clean --all egg_info -b "" sdist',
+ },
+ },
+)