summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRyan Petrello <rpetrell@redhat.com>2017-06-14 20:48:47 +0200
committerRyan Petrello <rpetrell@redhat.com>2017-06-16 15:59:21 +0200
commit44e0c8621a482a5b5185b3165bfbe6b25b34c8bf (patch)
treebb30e6983b51e51450f07ce860b8374b3fdfbd2d /setup.py
parentSupport for executing job and adhoc commands on isolated Tower nodes (#6524) (diff)
downloadawx-44e0c8621a482a5b5185b3165bfbe6b25b34c8bf.tar.xz
awx-44e0c8621a482a5b5185b3165bfbe6b25b34c8bf.zip
isolated ramparts: replace systemd unit with a `tower-expect` binary
instead of launching isolated tasks via `systemctl`, treat `awx.main.isolated.run` as an executable that knows how to daemonize additionally, add `setup.py isolated_build` for isolated Tower source distribution
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index bd7d5bd19e..dfedd8ce87 100755
--- a/setup.py
+++ b/setup.py
@@ -8,6 +8,7 @@ import datetime
import glob
import sys
from setuptools import setup
+from distutils.command.sdist import sdist
from awx import __version__
@@ -39,6 +40,30 @@ else:
sosconfig = "/usr/share/sosreport/sos/plugins"
#####################################################################
+# Isolated packaging
+#####################################################################
+
+
+class sdist_isolated(sdist):
+ includes = [
+ 'include awx/__init__.py',
+ 'include awx/main/isolated/run.py',
+ 'recursive-include awx/lib *.py',
+ ]
+
+ def get_file_list(self):
+ self.filelist.process_template_line('include setup.py')
+ for line in self.includes:
+ self.filelist.process_template_line(line)
+ self.write_manifest()
+
+ def make_release_tree(self, base_dir, files):
+ sdist.make_release_tree(self, base_dir, files)
+ with open(os.path.join(base_dir, 'MANIFEST.in'), 'w') as f:
+ f.write('\n'.join(self.includes))
+
+
+#####################################################################
# Helper Functions
@@ -112,7 +137,7 @@ setup(
entry_points = {
'console_scripts': [
'awx-manage = awx:manage',
- 'tower-manage = awx:manage',
+ 'tower-manage = awx:manage'
],
},
data_files = proc_data_files([
@@ -129,6 +154,7 @@ setup(
"tools/scripts/tower-python",
"tools/scripts/ansible-tower-setup"]),
("%s" % sosconfig, ["tools/sosreport/tower.py"])]),
+ cmdclass = {'sdist_isolated': sdist_isolated},
options = {
'egg_info': {
'tag_build': build_timestamp,
@@ -136,6 +162,7 @@ setup(
'aliases': {
'dev_build': 'clean --all egg_info sdist',
'release_build': 'clean --all egg_info -b "" sdist',
+ 'isolated_build': 'clean --all egg_info -b "" sdist_isolated',
},
'build_scripts': {
'executable': '/usr/bin/tower-python',