Skip to content

Commit

Permalink
Merge 1008d97 into 4ccde68
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Nov 11, 2019
2 parents 4ccde68 + 1008d97 commit 251e6b0
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .manylinux-install.sh
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e -x

# Compile wheels
for PYBIN in /opt/python/*/bin; do
if [[ "${PYBIN}" == *"cp27"* ]] || \
[[ "${PYBIN}" == *"cp35"* ]] || \
[[ "${PYBIN}" == *"cp36"* ]] || \
[[ "${PYBIN}" == *"cp37"* ]] || \
[[ "${PYBIN}" == *"cp38"* ]]; then
"${PYBIN}/pip" install -U pip setuptools cffi
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
rm -rf /io/build /io/*.egg-info
fi
done

# Bundle external shared libraries into the wheels
for whl in wheelhouse/zope.security*.whl; do
auditwheel repair "$whl" -w /io/wheelhouse/
done
5 changes: 5 additions & 0 deletions .manylinux.sh
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e -x

docker run --rm -v "$(pwd)":/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh
127 changes: 106 additions & 21 deletions .travis.yml
@@ -1,31 +1,116 @@
language: python
dist: xenial

env:
global:
TWINE_USERNAME: zope.wheelbuilder
TWINE_PASSWORD:
secure: "U6CeZtNEPDN3qKXfrLcvHFLrowqNWxmapXLWygZRxKgfR+ypowe1Y0a4kCBEBZKtysbY26MmIkrMV07tEMxny1yUWVCvRvUaQw0Ic3t5CM0R019zjVh9fQUTdWGCwri86Qj/OaeuPeMR0LCr6d9nMSun0GWSWhjOUhkTCdchfQw="

python:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
- pypy
- pypy3

matrix:
include:
- python: 2.7
- python: 3.5
- python: 3.6
- python: 3.7
- python: 3.8
- python: pypy2.7-6.0
- python: pypy3.5-6.0
- python: 2.7
env:
- PURE_PYTHON=1
- ZOPE_WATCH_CHECKERS=1
- python: 3.7

- name: "Python: 2.7, pure (no C extensions), with ZOPE_WATCH_CHECKERS enabled"
python: "2.7"
env: PURE_PYTHON=1 ZOPE_WATCH_CHECKERS=1

- name: "Python: 3.7, with ZOPE_WATCH_CHECKERS enabled"
python: 3.7
env: ZOPE_WATCH_CHECKERS=1
- python: 3.7

- name: "Python: 3.7, pure (no C extensions)"
python: 3.7
env: PURE_PYTHON=1

# manylinux wheel builds
- name: 64-bit manylinux wheels (all Pythons)
services: docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64
install: docker pull $DOCKER_IMAGE
script: bash .manylinux.sh

- name: 32-bit manylinux wheels (all Pythons)
services: docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_i686 PRE_CMD=linux32
install: docker pull $DOCKER_IMAGE
script: bash .manylinux.sh

# It's important to use 'macpython' builds to get the least
# restrictive wheel tag. It's also important to avoid
# 'homebrew 3' because it floats instead of being a specific version.
- name: Python 2.7 wheels for MacOS
os: osx
language: generic
env: TERRYFY_PYTHON='macpython 2.7.17'
- name: Python 3.5 wheels for MacOS
os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.5'
- name: Python 3.6 wheels for MacOS
os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.6.0'
- name: Python 3.7 wheels for MacOS
os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.7.0'

before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
git clone https://github.com/MacPython/terryfy
source terryfy/travis_tools.sh
get_python_environment $TERRYFY_PYTHON venv
fi
install:
- pip install -U pip setuptools
- pip install -U coveralls coverage
- pip install -U -e .[test,docs]
- pip install -U pip setuptools
- pip install -U coveralls coverage
# pip install zope.proxy here because because setup_requires will use
# easy_install, which fails on Python 3.5 on Mac OS
- pip install -U zope.proxy
- pip install -U -e .[test,docs]

script:
- coverage run -m zope.testrunner --test-path=src
- coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest
- python --version
- coverage run -m zope.testrunner --test-path=src
- coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest
- python setup.py bdist_wheel

after_success:
- coveralls
- coveralls
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# macpython 3.5 doesn't support recent TLS protocols which causes twine
# upload to fail, so we use the system Python to run twine
/usr/bin/python -m ensurepip --user
/usr/bin/python -m pip install --user -U pip
/usr/bin/python -m pip install --user -U -I twine
/usr/bin/python -m twine check dist/*
if [[ $TRAVIS_TAG ]]; then
/usr/bin/python -m twine upload --skip-existing dist/*
fi
fi
- |
if [[ -n "$DOCKER_IMAGE" ]]; then
pip install twine
twine check wheelhouse/*
if [[ $TRAVIS_TAG ]]; then
twine upload --skip-existing wheelhouse/*
fi
fi
notifications:
email: false
email: false

cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -12,6 +12,8 @@
- Properly declare dependency on zope.schema >= 4.2.0, introduced in
zope.security 4.2.1.

- Fix dict item view iteration on PyPy3 7.x.


4.3.1 (2019-01-03)
==================
Expand Down
4 changes: 4 additions & 0 deletions src/zope/security/checker.py
Expand Up @@ -886,6 +886,10 @@ def _fixup_dictlike(dict_type):
o_type = type(obj)
if o_type not in _default_checkers:
_default_checkers[o_type] = _iteratorChecker
# PyPy3 has special types for iter({}.items()) etc.
iter_type = type(iter(obj))
if iter_type not in _default_checkers:
_default_checkers[iter_type] = _iteratorChecker

def _fixup_odict():
# OrderedDicts have three different implementations: Python 2 (pure
Expand Down

0 comments on commit 251e6b0

Please sign in to comment.