Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53f002c

Browse files
Fix build by switching to docker on travis
1 parent b7e6c6c commit 53f002c

File tree

4 files changed

+89
-51
lines changed

4 files changed

+89
-51
lines changed

‎.travis.before-deploy.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/sh
22

3+
source ./.venv/bin/activate
4+
5+
yum -y install tar coreutils git
6+
37
# build the docs
48
# the first run is for the docs build, so don't clean up
59
pip install -r docs-requirements.txt

‎.travis.install.sh‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎.travis.sh‎

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,54 @@
1-
#!/bin/sh -x
1+
#!/bin/bash -ex
2+
3+
if [ x"$PYTHON" = "x3" ]; then
4+
IS3="3"
5+
else
6+
IS3=""
7+
fi
8+
9+
# We test Debian's cython. el7's cython is too old, and Rawhide's virtualenv
10+
# doesn't work right (usrmerge bugs) so we can only test Debian's cython.
11+
12+
if [ -f /etc/debian_version ]; then
13+
export DEBIAN_FRONTEND=noninteractive
14+
apt-get update
15+
16+
if [ x"$KRB5_VER" = "xheimdal" ]; then
17+
apt-get -y install heimdal-dev
18+
else
19+
apt-get -y install krb5-{user,kdc,admin-server,multidev} libkrb5-dev
20+
fi
21+
22+
apt-get -y install gcc virtualenv python$IS3-{virtualenv,dev} cython$IS3
23+
24+
virtualenv --system-site-packages -p $(which python${PYTHON}) .venv
25+
source ./.venv/bin/activate
26+
elif [ -f /etc/redhat-release ]; then
27+
# yum has no update-only verb
28+
29+
yum -y install krb5-{devel,libs,server,workstation} which gcc findutils
30+
31+
if [ -f /etc/fedora-release ]; then
32+
# path to binary here in case Rawhide changes it
33+
yum install -y redhat-rpm-config \
34+
/usr/bin/virtualenv python${PYTHON}-{virtualenv,devel}
35+
virtualenv -p $(which python${PYTHON}) .venv
36+
source ./.venv/bin/activate
37+
pip install --install-option='--no-cython-compile' cython
38+
else
39+
# Cython on el7 is too old - downstream patches
40+
yum install -y python$IS3-{virtualenv,devel}
41+
virtualenv -p $(which python$IS3) .venv
42+
source ./.venv/bin/activate
43+
pip install --upgrade pip # el7 pip doesn't quite work right
44+
pip install --install-option='--no-cython-compile' cython
45+
fi
46+
else
47+
echo "Distro not found!"
48+
false
49+
fi
50+
51+
pip install -r test-requirements.txt
252

353
# always build in-place so that Sphinx can find the modules
454
python setup.py build_ext --inplace

‎.travis.yml‎

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
1-
language: python
2-
python:
3-
- "2.7"
4-
- "3.5"
1+
sudo: required
52

6-
env:
7-
- KRB5_VER="1.10"
8-
- KRB5_VER="1.12"
9-
- KRB5_VER="1.13"
10-
# - KRB5_VER="master"
3+
# not necessary, but less confusing if defined
4+
language: python
115

12-
matrix:
13-
exclude:
14-
- python: "3.5"
15-
env: KRB5_VER="1.10"
16-
include:
17-
- python: "3.3"
18-
env: KRB5_VER="1.12"
19-
- python: "3.4"
20-
env: KRB5_VER="1.13"
21-
- python: "3.5"
22-
env: KRB5_VER="heimdal"
6+
services:
7+
- docker
238

24-
install: sh -ex .travis.install.sh
9+
env:
10+
- DISTRO=debian:stable PYTHON="2"
11+
- DISTRO=debian:stable PYTHON="3" # 3.4, not 3.5
12+
- DISTRO=debian:stable PYTHON="3" KRB5_VER="heimdal"
13+
- DISTRO=centos:7 PYTHON="2" # el7 doesn't do python3 modules
14+
- DISTRO=fedora:rawhide PYTHON="3"
15+
- DISTRO=fedora:rawhide PYTHON="2"
2516

26-
script: sh -x .travis.sh
17+
script:
18+
- sudo sed -i '1i 127.0.0.1 test.box' /etc/hosts
19+
- sudo hostname test.box
20+
- >
21+
docker run
22+
-v `pwd`:/tmp/build
23+
-w /tmp/build
24+
-e KRB5_VER=$KRB5_VER
25+
-e PYTHON=$PYTHON
26+
$DISTRO
27+
/bin/bash -ex .travis.sh
2728
28-
before_deploy: sh -x .travis.before-deploy.sh
29+
before_deploy:
30+
- >
31+
docker run
32+
-v `pwd`:/tmp/build
33+
-w /tmp/build
34+
-e TRAVIS_TAG=$TRAVIS_TAG
35+
-e PKG_NAME_VER=$PKG_NAME_VER
36+
$DISTRO
37+
/bin/sh -x .travis.before-deploy.sh
2938
deploy:
3039
- provider: releases
3140
api_key:
@@ -36,8 +45,7 @@ deploy:
3645
on:
3746
repo: pythongssapi/python-gssapi
3847
tags: true
39-
python: "3.5"
40-
condition: "$KRB5_VER = '1.13'"
48+
condition: "$DISTRO = 'fedora:rawhide' && $PYTHON = '3'"
4149
skip_cleanup: true
4250
- provider: pypi
4351
user:
@@ -47,7 +55,6 @@ deploy:
4755
on:
4856
repo: pythongssapi/python-gssapi
4957
tags: true
50-
python: "3.5"
51-
condition: "$KRB5_VER = '1.13'"
58+
condition: "$DISTRO = 'fedora:rawhide' && $PYTHON = '3'"
5259
skip_cleanup: true
5360
docs_dir: travis_docs_build/html

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /