mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Moved awx packages inside venv, restructured spec file, restructured Makefile
This commit is contained in:
16
Makefile
16
Makefile
@@ -168,7 +168,6 @@ endif
|
|||||||
.DEFAULT_GOAL := build
|
.DEFAULT_GOAL := build
|
||||||
|
|
||||||
.PHONY: clean rebase push requirements requirements_dev requirements_jenkins \
|
.PHONY: clean rebase push requirements requirements_dev requirements_jenkins \
|
||||||
real-requirements real-requirements_dev real-requirements_jenkins \
|
|
||||||
develop refresh adduser migrate dbchange dbshell runserver celeryd \
|
develop refresh adduser migrate dbchange dbshell runserver celeryd \
|
||||||
receiver test test_unit test_coverage coverage_html test_jenkins dev_build \
|
receiver test test_unit test_coverage coverage_html test_jenkins dev_build \
|
||||||
release_build release_clean sdist rpmtar mock-rpm mock-srpm rpm-sign \
|
release_build release_clean sdist rpmtar mock-rpm mock-srpm rpm-sign \
|
||||||
@@ -259,33 +258,34 @@ virtualenv:
|
|||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install runtime, development and jenkins requirements
|
requirements_ansible:
|
||||||
requirements requirements_ansible requirements_dev requirements_jenkins: %: real-%
|
|
||||||
|
|
||||||
real-requirements_ansible: virtualenv
|
|
||||||
if [ "$(VENV_BASE)" ]; then \
|
if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/ansible/bin/activate; \
|
. $(VENV_BASE)/ansible/bin/activate; \
|
||||||
fi && \
|
fi && \
|
||||||
pip install -r requirements/requirements_ansible.txt
|
pip install -r requirements/requirements_ansible.txt
|
||||||
|
|
||||||
# Install third-party requirements needed for Tower's environment.
|
# Install third-party requirements needed for Tower's environment.
|
||||||
real-requirements: requirements_ansible
|
requirements_tower:
|
||||||
if [ "$(VENV_BASE)" ]; then \
|
if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/tower/bin/activate; \
|
. $(VENV_BASE)/tower/bin/activate; \
|
||||||
fi && \
|
fi && \
|
||||||
pip install -r requirements/requirements.txt; \
|
pip install -r requirements/requirements.txt; \
|
||||||
|
|
||||||
real-requirements_dev: requirements_ansible
|
requirements_tower_dev:
|
||||||
if [ "$(VENV_BASE)" ]; then \
|
if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/tower/bin/activate; \
|
. $(VENV_BASE)/tower/bin/activate; \
|
||||||
fi && \
|
fi && \
|
||||||
pip install -r requirements/requirements_dev.txt
|
pip install -r requirements/requirements_dev.txt
|
||||||
|
|
||||||
# Install third-party requirements needed for running unittests in jenkins
|
# Install third-party requirements needed for running unittests in jenkins
|
||||||
real-requirements_jenkins:
|
requirements_jenkins:
|
||||||
pip install -r requirements/requirements_jenkins.txt
|
pip install -r requirements/requirements_jenkins.txt
|
||||||
$(NPM_BIN) install csslint jshint
|
$(NPM_BIN) install csslint jshint
|
||||||
|
|
||||||
|
requirements: virtualenv requirements_ansible requirements_tower
|
||||||
|
|
||||||
|
requirements_dev: virtualenv requirements_ansible requirements_tower_dev
|
||||||
|
|
||||||
# "Install" ansible-tower package in development mode.
|
# "Install" ansible-tower package in development mode.
|
||||||
develop:
|
develop:
|
||||||
@if [ "$(VIRTUAL_ENV)" ]; then \
|
@if [ "$(VIRTUAL_ENV)" ]; then \
|
||||||
|
|||||||
16
setup.py
16
setup.py
@@ -17,30 +17,26 @@ if os.getenv('OFFICIAL', 'no') == 'yes':
|
|||||||
else:
|
else:
|
||||||
build_timestamp = '-' + os.getenv("BUILD", datetime.datetime.now().strftime('0.git%Y%m%d%H%M'))
|
build_timestamp = '-' + os.getenv("BUILD", datetime.datetime.now().strftime('0.git%Y%m%d%H%M'))
|
||||||
|
|
||||||
# Path prefix for when we're running under a software collection
|
|
||||||
scl_prefix = os.getenv('SCL_PREFIX', '')
|
|
||||||
httpd_scl_prefix = os.getenv('HTTPD_SCL_PREFIX', scl_prefix)
|
|
||||||
|
|
||||||
# Paths we'll use later
|
# Paths we'll use later
|
||||||
etcpath = "/etc/tower"
|
etcpath = "/etc/tower"
|
||||||
homedir = "/var/lib/awx"
|
homedir = "/var/lib/awx"
|
||||||
bindir = "/usr/bin"
|
bindir = "/usr/bin"
|
||||||
sharedir = scl_prefix + "/usr/share/awx"
|
sharedir = "/usr/share/awx"
|
||||||
docdir = scl_prefix + "/usr/share/doc/ansible-tower"
|
docdir = "/usr/share/doc/ansible-tower"
|
||||||
munin_plugin_path = "/etc/munin/plugins/"
|
munin_plugin_path = "/etc/munin/plugins/"
|
||||||
munin_plugin_conf_path = "/etc/munin/plugin-conf.d"
|
munin_plugin_conf_path = "/etc/munin/plugin-conf.d"
|
||||||
|
|
||||||
if os.path.exists("/etc/debian_version"):
|
if os.path.exists("/etc/debian_version"):
|
||||||
sysinit = scl_prefix + "/etc/init.d"
|
sysinit = "/etc/init.d"
|
||||||
webconfig = httpd_scl_prefix + "/etc/apache2/conf.d"
|
webconfig = "/etc/apache2/conf.d"
|
||||||
shutil.copy("config/awx-munin-ubuntu.conf", "config/awx-munin.conf")
|
shutil.copy("config/awx-munin-ubuntu.conf", "config/awx-munin.conf")
|
||||||
# sosreport-3.1 (and newer) look in '/usr/share/sosreport/sos/plugins'
|
# sosreport-3.1 (and newer) look in '/usr/share/sosreport/sos/plugins'
|
||||||
# sosreport-3.0 looks in '/usr/lib/python2.7/dist-packages/sos/plugins'
|
# sosreport-3.0 looks in '/usr/lib/python2.7/dist-packages/sos/plugins'
|
||||||
# debian/<package>.links will create symlinks to support both versions
|
# debian/<package>.links will create symlinks to support both versions
|
||||||
sosconfig = "/usr/share/sosreport/sos/plugins"
|
sosconfig = "/usr/share/sosreport/sos/plugins"
|
||||||
else:
|
else:
|
||||||
sysinit = scl_prefix + "/etc/rc.d/init.d"
|
sysinit = "/etc/rc.d/init.d"
|
||||||
webconfig = httpd_scl_prefix + "/etc/httpd/conf.d"
|
webconfig = "/etc/httpd/conf.d"
|
||||||
shutil.copy("config/awx-munin-el.conf", "config/awx-munin.conf")
|
shutil.copy("config/awx-munin-el.conf", "config/awx-munin.conf")
|
||||||
# The .spec will create symlinks to support multiple versions of sosreport
|
# The .spec will create symlinks to support multiple versions of sosreport
|
||||||
sosconfig = "/usr/share/sosreport/sos/plugins"
|
sosconfig = "/usr/share/sosreport/sos/plugins"
|
||||||
|
|||||||
Reference in New Issue
Block a user