summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2013-06-25 20:30:40 +0200
committerJames Cammarata <jimi@sngx.net>2013-06-25 20:30:40 +0200
commit946492b023b08a7ece8342002d24a363f77ce342 (patch)
tree056b89c5e423756f7d598a78dfe34dbaa646e5bd /Makefile
parentRemoved old path for inventory script. (diff)
downloadawx-946492b023b08a7ece8342002d24a363f77ce342.tar.xz
awx-946492b023b08a7ece8342002d24a363f77ce342.zip
Changes to build process to remove .py files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a52ea35a92..6f33420921 100644
--- a/Makefile
+++ b/Makefile
@@ -134,7 +134,13 @@ sdist: clean
BUILD=$(BUILD) $(PYTHON) setup.py sdist; \
fi
-rpm: sdist
+compiled: sdist
+ (cd dist/ && tar zxf $(SDIST_TAR_FILE))
+ (cd dist/ && $(PYTHON) -m compileall -f -x "(plugins/callback/job_event_callback.py|scripts/inventory.py|settings/*.py|site-packages/*.py)" ./awx-$(VERSION)$(BUILD)/awx)
+ (cd dist/ && find ./awx-$(VERSION)$(BUILD)/awx \( -name "*.py" ! -path "*/plugins/callback/job_event_callback.py" ! -path "*/scripts/inventory.py" ! -path "*/settings/*.py" ! -path "*/site-packages/*.py" \) -delete)
+ (cd dist/ && tar zcf $(SDIST_TAR_FILE) awx-$(VERSION)$(BUILD))
+
+rpm: compiled
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/
@rpmbuild --define "_topdir %(pwd)/rpm-build" \
@@ -146,7 +152,7 @@ rpm: sdist
--define "_sourcedir %{_topdir}" \
-ba packaging/rpm/awx.spec
-deb: sdist
+deb: compiled
@mkdir -p deb-build
@cp dist/$(SDIST_TAR_FILE) deb-build/
(cd deb-build && tar zxf $(SDIST_TAR_FILE))