Create aliases for generating RPM and DEB sdist

Adds the following aliases to assist with packaging-specific sdist.
 * dev_deb and release_deb - includes only .pyc files
 * dev_rpm and release_rpm - includes only .py files (later removed by
   install_lib)

The rpm sdist tarball is a traditional source distribution.  During the build
process, RPM will byte-compile and remove the .py source files.  The deb sdist
includes only byte-compiled awx python.
This commit is contained in:
James Laska
2014-05-22 11:25:50 -04:00
parent f7b7508ecf
commit 54713b1a2e
2 changed files with 23 additions and 13 deletions

View File

@@ -210,11 +210,20 @@ release_clean:
-(rm *.tar)
-(rm -rf ($RELEASE))
# Traditional 'sdist'
sdist: clean minjs
if [ "$(OFFICIAL)" = "yes" ] ; then \
$(PYTHON) setup.py release_build; \
$(PYTHON) setup.py release_rpm; \
else \
BUILD=$(BUILD) $(PYTHON) setup.py sdist_awx; \
BUILD=$(BUILD) $(PYTHON) setup.py dev_rpm; \
fi
# Differs from 'sdist' because it includes 'byte-compiled' files in the tarball
sdist_deb: clean minjs
if [ "$(OFFICIAL)" = "yes" ] ; then \
$(PYTHON) setup.py release_deb ; \
else \
BUILD=$(BUILD) $(PYTHON) setup.py dev_deb; \
fi
rpmtar: sdist
@@ -258,7 +267,7 @@ rpm: rpmtar
--define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
-ba rpm-build/$(NAME).spec
deb: sdist
deb: sdist_deb
@mkdir -p deb-build
@cp dist/$(SDIST_TAR_FILE) deb-build/
(cd deb-build && tar zxf $(SDIST_TAR_FILE))