mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
More debian packaging stuff
* Added ability to do official vs dev builds (need to add to the RPM builds now) * Reverted changes to awx/wsgi.py after talking with Chris C. regarding the pathing issues and created config/wsgi.py instead that is installed to /var/lib/awx * Cleaned up package scripts so there's less junk being written to the screen during the install/uninstall
This commit is contained in:
parent
f5869134b2
commit
cbc9f18366
37
Makefile
37
Makefile
@ -1,7 +1,23 @@
|
|||||||
PYTHON=python
|
PYTHON=python
|
||||||
SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
||||||
RELEASE=awx-1.2b2
|
|
||||||
|
# Get the branch information from git
|
||||||
|
GIT_DATE := $(shell git log -n 1 --format="%ai")
|
||||||
|
DATE := $(shell date --utc +%Y%m%d%H%M)
|
||||||
|
|
||||||
VERSION=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.split('-')[0])")
|
VERSION=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.split('-')[0])")
|
||||||
|
RELEASE=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.split('-')[1])")
|
||||||
|
ifneq ($(OFFICIAL),yes)
|
||||||
|
BUILD=-dev$(DATE)
|
||||||
|
SDIST_TAR_FILE=awx-$(VERSION)$(BUILD).tar.gz
|
||||||
|
DEB_BUILD_DIR=deb-build/awx-$(VERSION)$(BUILD)
|
||||||
|
DEB_PKG_RELEASE=$(VERSION)$(BUILD)
|
||||||
|
else
|
||||||
|
BUILD=
|
||||||
|
SDIST_TAR_FILE=awx-$(VERSION).tar.gz
|
||||||
|
DEB_BUILD_DIR=deb-build/awx-$(VERSION)
|
||||||
|
DEB_PKG_RELEASE=$(VERSION)-$(RELEASE)
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: clean rebase push setup requirements requirements_pypi develop refresh \
|
.PHONY: clean rebase push setup requirements requirements_pypi develop refresh \
|
||||||
adduser syncdb migrate dbchange dbshell runserver celeryd test \
|
adduser syncdb migrate dbchange dbshell runserver celeryd test \
|
||||||
@ -112,7 +128,11 @@ release_clean:
|
|||||||
-(rm -rf ($RELEASE))
|
-(rm -rf ($RELEASE))
|
||||||
|
|
||||||
sdist: clean
|
sdist: clean
|
||||||
$(PYTHON) setup.py release_build
|
if [ "$(OFFICIAL)" = "yes" ] ; then \
|
||||||
|
$(PYTHON) setup.py release_build; \
|
||||||
|
else \
|
||||||
|
BUILD=$(BUILD) $(PYTHON) setup.py sdist; \
|
||||||
|
fi
|
||||||
|
|
||||||
rpm: sdist
|
rpm: sdist
|
||||||
@mkdir -p rpm-build
|
@mkdir -p rpm-build
|
||||||
@ -128,12 +148,13 @@ rpm: sdist
|
|||||||
|
|
||||||
deb: sdist
|
deb: sdist
|
||||||
@mkdir -p deb-build
|
@mkdir -p deb-build
|
||||||
@cp dist/*.gz deb-build/
|
@cp dist/$(SDIST_TAR_FILE) deb-build/
|
||||||
(cd deb-build && tar zxf awx-$(VERSION).tar.gz)
|
(cd deb-build && tar zxf $(SDIST_TAR_FILE))
|
||||||
(cd deb-build/awx-$(VERSION) && dh_make --single --yes -f ../awx-$(VERSION).tar.gz)
|
(cd $(DEB_BUILD_DIR) && dh_make --indep --yes -f ../awx-$(VERSION)$(BUILD).tar.gz -p awx-$(VERSION)$(BUILD))
|
||||||
@rm -rf deb-build/awx-$(VERSION)/debian
|
@rm -rf $(DEB_BUILD_DIR)/debian
|
||||||
@cp -a packaging/debian deb-build/awx-$(VERSION)/
|
@cp -a packaging/debian $(DEB_BUILD_DIR)/
|
||||||
(cd deb-build/awx-$(VERSION) && dpkg-buildpackage -nc -us -uc -b)
|
@echo "awx_$(DEB_PKG_RELEASE).deb admin optional" > $(DEB_BUILD_DIR)/debian/realfiles
|
||||||
|
(cd $(DEB_BUILD_DIR) && PKG_RELEASE=$(DEB_PKG_RELEASE) dpkg-buildpackage -nc -us -uc -b --changes-option="-fdebian/realfiles")
|
||||||
|
|
||||||
install:
|
install:
|
||||||
$(PYTHON) setup.py install egg_info -b ""
|
$(PYTHON) setup.py install egg_info -b ""
|
||||||
|
|||||||
@ -19,7 +19,7 @@ from distutils.sysconfig import get_python_lib
|
|||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'awx.settings.%s' % MODE)
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'awx.settings.%s' % MODE)
|
||||||
|
|
||||||
# Add local site-packages directory to path.
|
# Add local site-packages directory to path.
|
||||||
local_site_packages = os.path.join(get_python_lib(), 'awx', 'lib',
|
local_site_packages = os.path.join(os.path.dirname(__file__), 'lib',
|
||||||
'site-packages')
|
'site-packages')
|
||||||
sys.path.insert(0, local_site_packages)
|
sys.path.insert(0, local_site_packages)
|
||||||
|
|
||||||
|
|||||||
1
config/wsgi.py
Normal file
1
config/wsgi.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from awx.wsgi import application
|
||||||
7
setup.py
7
setup.py
@ -8,7 +8,8 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
from awx import __version__
|
from awx import __version__
|
||||||
|
|
||||||
build_timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M')
|
#build_timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M')
|
||||||
|
build_timestamp = os.getenv("BUILD",datetime.datetime.now().strftime('-%Y%m%d%H%M'))
|
||||||
|
|
||||||
# Paths we'll use later
|
# Paths we'll use later
|
||||||
etcpath = "/etc/awx"
|
etcpath = "/etc/awx"
|
||||||
@ -99,7 +100,7 @@ setup(
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
data_files = proc_data_files([
|
data_files = proc_data_files([
|
||||||
("%s" % homedir, ["awx/wsgi.py",
|
("%s" % homedir, ["config/wsgi.py",
|
||||||
"awx/static/favicon.ico",
|
"awx/static/favicon.ico",
|
||||||
]),
|
]),
|
||||||
("%s" % etcpath, [settingsconf,]),
|
("%s" % etcpath, [settingsconf,]),
|
||||||
@ -108,7 +109,7 @@ setup(
|
|||||||
),
|
),
|
||||||
options={
|
options={
|
||||||
'egg_info': {
|
'egg_info': {
|
||||||
'tag_build': '-dev%s' % build_timestamp,
|
'tag_build': '%s' % build_timestamp,
|
||||||
},
|
},
|
||||||
'aliases': {
|
'aliases': {
|
||||||
'dev_build': 'clean --all egg_info sdist',
|
'dev_build': 'clean --all egg_info sdist',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user