Skip to content

Commit

Permalink
Python3 version:
Browse files Browse the repository at this point in the history
- update packaging script and process - adding rpm and freebsd
  • Loading branch information
mohierf committed May 19, 2018
1 parent b958a4a commit b52e80c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ after_success:
- |
if [[ $TEST_SUITE == 'unit_tests' ]]; then
./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION;
./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION deb;
./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION rpm;
./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION freebsd;
fi
notifications:
Expand Down
14 changes: 9 additions & 5 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ set -ev
# Default is branch develop, python 3.5
git_branch=$1
python_version=$2
output_type=$3
if [ $# -eq 0 ]; then
git_branch="develop"
python_version="3.5"
Expand All @@ -43,15 +44,15 @@ fi
echo "Installing fpm..."
gem install --no-ri --no-rdoc fpm

echo "Building packages for branch ${git_branch}, python version ${python_version}"
echo "Installing rpm..."
apt-get install rpm

echo "Building ${output_type} package for branch ${git_branch}, python version ${python_version}"

# Package information
version=`python -c "from alignak import __version__;print(__version__)"`
version_date=`date "+%Y-%m-%d%"`

# Output for Debian
output_type="deb"

if [ "$1" = "master" ]; then
# Updating deploy script for Alignak stable version
sed -i -e "s|\"sed_version_name\"|\"${version}\"|g" .bintray.json
Expand Down Expand Up @@ -84,6 +85,7 @@ fi
# Use python dependencies - all Alignak python packages
# are packaged in the main distros so it will use the
# distro packages rather than the python one
# Use the python version as a prefix for the package name
fpm \
--verbose \
--force \
Expand All @@ -95,6 +97,7 @@ fpm \
--version ${version} \
--vendor "Alignak Team (contact@alignak.net)" \
--maintainer "Alignak Team (contact@alignak.net)" \
--python-package-name-prefix "python${python_version}" \
--python-scripts-executable "/usr/bin/python" \
--python-install-lib "/usr/lib/python${python_version}/dist-packages" \
--python-install-data '/usr/local' \
Expand All @@ -107,4 +110,5 @@ fpm \
--deb-systemd ./bin/systemd/alignak-receiver@.service \
--deb-systemd ./bin/systemd/alignak-scheduler@.service \
--deb-systemd ./bin/systemd/alignak.service \
--deb-no-default-config-files ./setup.py
--deb-no-default-config-files \
./setup.py

0 comments on commit b52e80c

Please sign in to comment.