Skip to content

Release updates for python-3.8 and removing python2 #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 15 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ install: skip
before_install: skip

stages:
- verify
- test
- name: deploy latest docs
if: (branch = master OR branch =~ ^infra/$) AND type = push
Expand All @@ -28,59 +27,40 @@ script:
- if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then ./.travis/build.sh; fi

jobs:
include:
- &docker_verify
stage: verify
env: DISTRO=fedora:latest PYTHON="2"
script:
- source ./.travis/lib-util.sh
- util::docker-run $DISTRO ./.travis/verify.sh

- <<: *docker_verify
env: DISTRO=fedora:latest PYTHON="3"


# need to explictly define each builder for test due to different os types
include:
- stage: test
env: DISTRO=debian:stable PYTHON="2"

- stage: test
env: DISTRO=debian:stable PYTHON="3" # 3.4, not 3.5
env: DISTRO=debian:stable PYTHON="3" # 3.7

- stage: test
env: DISTRO=debian:stable PYTHON="3" KRB5_VER="heimdal"

# el7 doesn't do python3 modules, and epel7's python3-gssapi is patched
- stage: test
env: DISTRO=centos:7 PYTHON="2" # el7 doesn't do python3 modules

- stage: test
env: DISTRO=fedora:latest PYTHON="3"
env: DISTRO=centos:8 PYTHON="3"

- stage: test
env: DISTRO=fedora:latest PYTHON="2"
env: DISTRO=fedora:latest PYTHON="3" FLAKE="yes"

# Travis defaults to 10.13 (i.e., not latest), so specify osx_image
- &osx_test
stage: test
env: PYTHON="2" KRB5_VER="heimdal" PYENV="2.7.14"
env: PYTHON="3" KRB5_VER="heimdal" PYENV="3.6.3"
os: osx
osx_image: xcode9.2
language: generic # causes issues with pyenv installer when set to python

- <<: *osx_test
env: PYTHON="3" KRB5_VER="heimdal" PYENV="3.6.3"

- &win_test
stage: test
env: PYTHON="2" PYENV="2.7.16" EXTRA_BUILDEXT="--compiler=mingw32"
env: PYTHON="3" PYENV="3.8.1"
os: windows
language: sh # Windows not supported yet

- <<: *win_test
env: PYTHON="3" PYENV="3.6.8"

- <<: *win_test
env: PYTHON="3" PYENV="3.7.3"

- <<: *win_test
env: PYTHON="3" PYENV="3.6.8"

- stage: deploy latest docs
script: skip
Expand All @@ -99,7 +79,6 @@ jobs:
on:
all_branches: true


- stage: deploy
script: skip
env:
Expand Down Expand Up @@ -146,17 +125,17 @@ jobs:
- ./.travis/before-deploy-windows-wheels.sh
- ./.travis/deploy-win.sh
env:
- PYTHON="2"
- PYENV="2.7.16"
- EXTRA_BUILDEXT="--compiler=mingw32"
- PYTHON="3"
- PYENV="3.8.1"
language: sh # Travis doesn't support python here

- <<: *win_deploy
env:
- PYTHON="3"
- PYENV="3.6.8"
- PYENV="3.7.3"

- <<: *win_deploy
env:
- PYTHON="3"
- PYENV="3.7.3"
- PYENV="3.6.8"

22 changes: 22 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
source ./.travis/lib-setup.sh
setup::install

if [ x"$FLAKE" = "xyes" ]; then
flake8 setup.py
F8_SETUP=$?

flake8 gssapi
F8_PY=$?

# Cython requires special flags since it is not proper Python:
# - E225: missing whitespace around operator
# - E226: missing whitespace around arithmetic operator
# - E227: missing whitespace around bitwise or shift operator
# - E402: module level import not at top of file (needed for the `GSSAPI="blah" lines)
# - E901: SyntaxError or IndentationError
# - E999: Internal AST compilation error (flake8 specific)
flake8 gssapi --filename='*.pyx,*.pxd' --ignore=E225,E226,E227,E402,E901,E999
F8_MAIN_CYTHON=$?

if [ $F8_SETUP -ne 0 -o $F8_PY -ne 0 -o $F8_MAIN_CYTHON -ne 0 ]; then
exit 1
fi
fi

# always build in-place so that Sphinx can find the modules
python setup.py build_ext --inplace $EXTRA_BUILDEXT
BUILD_RES=$?
Expand Down
14 changes: 4 additions & 10 deletions .travis/lib-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ setup::debian::install() {
}

setup::rh::yuminst() {
# yum has no update-only verb
yum -y --nogpgcheck install $@
# yum has no update-only verb. Also: modularity just makes this slower.
yum -y --nogpgcheck --disablerepo=\*modul\* install $@
}

setup::centos::install() {
Expand Down Expand Up @@ -67,7 +67,8 @@ setup::rh::install() {
}

setup::macos::install() {
# install Python from pyenv so we know what version is being used
# Install Python from pyenv so we know what version is being used. This
# doesn't work for newer macos.
pyenv install $PYENV
pyenv global $PYENV
virtualenv -p $(pyenv which python) .venv
Expand All @@ -83,13 +84,6 @@ setup::windows::install() {
# Update path to include them
export PATH="$PYPATH:$PYPATH/Scripts:/c/Program Files/MIT/Kerberos/bin:$PATH"

if [ "${PYENV:0:1}" == "2" ]; then
choco install vcredist2008
# Skip dotnet dependency:
# https://github.com/fredrikaverpil/vcpython27/pull/3
choco install --ignore-dependencies vcpython27
fi

python -m pip install --upgrade pip
}

Expand Down
1 change: 1 addition & 0 deletions .travis/lib-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ util::docker-run() {
-e PKG_NAME_VER=$PKG_NAME_VER \
-e KRB5_VER=$KRB5_VER \
-e PYTHON=$PYTHON \
-e FLAKE=$FLAKE \
$distro \
/bin/bash -ex $@
}
25 changes: 0 additions & 25 deletions .travis/lib-verify.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .travis/verify.sh

This file was deleted.