Commit fa5432f2 authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.27.x'

parents e7e923f3 7cd06bea
language: python os: linux
dist: trusty dist: trusty
sudo: false sudo: false
addons:
apt:
packages:
- gdb
- python-dbg
- python3-dbg
cache: cache:
pip: true pip: true
directories: directories:
- $HOME/.ccache - $HOME/.ccache
language: python
python: python:
- 2.7 - 2.7
- 3.6 - 3.6
...@@ -30,17 +38,67 @@ env: ...@@ -30,17 +38,67 @@ env:
- BACKEND=c - BACKEND=c
- BACKEND=cpp - BACKEND=cpp
matrix:
include:
- os: osx
osx_image: xcode6.4
env: BACKEND=c PY=2
python: 2
language: c
compiler: clang
cache: false
- os: osx
osx_image: xcode6.4
env: BACKEND=cpp PY=2
python: 2
language: cpp
compiler: clang
cache: false
- os: osx
osx_image: xcode6.4
env: BACKEND=c PY=3
python: 3
language: c
compiler: clang
cache: false
- os: osx
osx_image: xcode6.4
env: BACKEND=cpp PY=3
python: 3
language: cpp
compiler: clang
cache: false
allow_failures:
- python: pypy
- python: pypy3
- python: 3.6-dev
- python: 3.7-dev
exclude:
- python: pypy
env: BACKEND=cpp
- python: pypy3
env: BACKEND=cpp
branches: branches:
only: only:
- master - master
- release - release
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then # Install Miniconda
curl -s -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda$PY-latest-MacOSX-x86_64.sh;
bash miniconda.sh -b -p $HOME/miniconda && rm miniconda.sh;
export PATH="$HOME/miniconda/bin:$PATH"; hash -r;
#conda install --quiet --yes nomkl --file=test-requirements.txt --file=test-requirements-cpython.txt;
fi
install: install:
- python -c 'import sys; print("Python %s" % (sys.version,))' - python -c 'import sys; print("Python %s" % (sys.version,))'
- if [ -n "${TRAVIS_PYTHON_VERSION##*-dev}" -a -n "${TRAVIS_PYTHON_VERSION##2.6*}" ]; then pip install -r test-requirements.txt $( [ -z "${TRAVIS_PYTHON_VERSION##pypy*}" ] || echo " -r test-requirements-cpython.txt" ) ; fi - if [ -n "${TRAVIS_PYTHON_VERSION##*-dev}" -a -n "${TRAVIS_PYTHON_VERSION##2.6*}" ]; then pip install -r test-requirements.txt $( [ -z "${TRAVIS_PYTHON_VERSION##pypy*}" ] || echo " -r test-requirements-cpython.txt" ) ; fi
- CFLAGS="-O2 -ggdb -Wall -Wextra $(python -c 'import sys; print("-fno-strict-aliasing" if sys.version_info[0] == 2 else "")')" python setup.py build - CFLAGS="-O2 -ggdb -Wall -Wextra $(python -c 'import sys; print("-fno-strict-aliasing" if sys.version_info[0] == 2 else "")')" python setup.py build
before_script: ccache -s before_script: ccache -s || true
script: script:
- PYTHON_DBG="python$( python -c 'import sys; print("%d.%d" % sys.version_info[:2])' )-dbg" - PYTHON_DBG="python$( python -c 'import sys; print("%d.%d" % sys.version_info[:2])' )-dbg"
...@@ -48,22 +106,3 @@ script: ...@@ -48,22 +106,3 @@ script:
- if [ false && "$BACKEND" = "cpp" ]; then pip install pythran; fi # disabled: needs Pythran > 0.8.1 - if [ false && "$BACKEND" = "cpp" ]; then pip install pythran; fi # disabled: needs Pythran > 0.8.1
- CFLAGS="-O2 -ggdb -Wall -Wextra $(python -c 'import sys; print("-fno-strict-aliasing" if sys.version_info[0] == 2 else "")')" python setup.py build_ext -i - CFLAGS="-O2 -ggdb -Wall -Wextra $(python -c 'import sys; print("-fno-strict-aliasing" if sys.version_info[0] == 2 else "")')" python setup.py build_ext -i
- CFLAGS="-O0 -ggdb -Wall -Wextra" python runtests.py -vv -x Debugger --backends=$BACKEND -j7 - CFLAGS="-O0 -ggdb -Wall -Wextra" python runtests.py -vv -x Debugger --backends=$BACKEND -j7
matrix:
allow_failures:
- python: pypy
- python: pypy3
- python: 3.6-dev
- python: 3.7-dev
exclude:
- python: pypy
env: BACKEND=cpp
- python: pypy3
env: BACKEND=cpp
addons:
apt:
packages:
- gdb
- python-dbg
- python3-dbg
...@@ -270,16 +270,25 @@ ...@@ -270,16 +270,25 @@
#define CYTHON_FALLTHROUGH [[fallthrough]] #define CYTHON_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough) #elif __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]] #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
#endif #endif
#endif #endif
#ifndef CYTHON_FALLTHROUGH #ifndef CYTHON_FALLTHROUGH
#if (defined(__GNUC__) || defined(__clang__)) && __has_attribute(fallthrough) #if __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else #else
#define CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH
#endif #endif
#endif #endif
#if defined(__clang__ ) && defined(__apple_build_version__)
#if __apple_build_version__ < 7000000 /* Xcode < 7.0 */
#undef CYTHON_FALLTHROUGH
#define CYTHON_FALLTHROUGH
#endif
#endif
#endif #endif
/////////////// CInitCode /////////////// /////////////// CInitCode ///////////////
...@@ -1040,7 +1049,7 @@ static int __Pyx_RegisterCleanup(void); /*proto*/ ...@@ -1040,7 +1049,7 @@ static int __Pyx_RegisterCleanup(void); /*proto*/
//@substitute: naming //@substitute: naming
//@requires: ImportExport.c::ModuleImport //@requires: ImportExport.c::ModuleImport
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) {
${cleanup_cname}(module); ${cleanup_cname}(module);
Py_INCREF(Py_None); return Py_None; Py_INCREF(Py_None); return Py_None;
...@@ -1113,7 +1122,7 @@ bad: ...@@ -1113,7 +1122,7 @@ bad:
#else #else
// fake call purely to work around "unused function" warning for __Pyx_ImportModule() // fake call purely to work around "unused function" warning for __Pyx_ImportModule()
static int __Pyx_RegisterCleanup(void) { static int __Pyx_RegisterCleanup(void) {
if ((0)) __Pyx_ImportModule(NULL); (void)__Pyx_ImportModule; /* unused */
return 0; return 0;
} }
#endif #endif
......
# Makefile for creating our standalone Cython program # Makefile for creating our standalone Cython program
PYTHON := python PYTHON := python
PYVERSION := $(shell $(PYTHON) -c "import sys; print(sys.version[:3])") PYVERSION := $(shell $(PYTHON) -c "import sys; print(sys.version[:3])")
PYPREFIX := $(shell $(PYTHON) -c "import sys; print(sys.prefix)")
INCDIR := $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc())") INCDIR := $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")
PLATINCDIR := $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc(plat_specific=True))") PLATINCDIR := $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc(plat_specific=True))")
...@@ -31,5 +32,5 @@ clean: ...@@ -31,5 +32,5 @@ clean:
@rm -f *~ *.o *.so core core.* *.c embedded test.output @rm -f *~ *.o *.so core core.* *.c embedded test.output
test: clean all test: clean all
LD_LIBRARY_PATH=$(LIBDIR1):$$LD_LIBRARY_PATH ./embedded > test.output PYTHONHOME=$(PYPREFIX) LD_LIBRARY_PATH=$(LIBDIR1):$$LD_LIBRARY_PATH ./embedded > test.output
$(PYTHON) assert_equal.py embedded.output test.output $(PYTHON) assert_equal.py embedded.output test.output
...@@ -253,7 +253,6 @@ def update_cpp11_extension(ext): ...@@ -253,7 +253,6 @@ def update_cpp11_extension(ext):
update cpp11 extensions that will run on versions of gcc >4.8 update cpp11 extensions that will run on versions of gcc >4.8
""" """
gcc_version = get_gcc_version(ext.language) gcc_version = get_gcc_version(ext.language)
compiler_version = gcc_version.group(1)
if gcc_version is not None: if gcc_version is not None:
compiler_version = gcc_version.group(1) compiler_version = gcc_version.group(1)
if float(compiler_version) > 4.8: if float(compiler_version) > 4.8:
...@@ -2089,6 +2088,13 @@ def runtests(options, cmd_args, coverage=None): ...@@ -2089,6 +2088,13 @@ def runtests(options, cmd_args, coverage=None):
sys.stderr.write("Backends: %s\n" % ','.join(backends)) sys.stderr.write("Backends: %s\n" % ','.join(backends))
languages = backends languages = backends
if 'TRAVIS' in os.environ and sys.platform == 'darwin' and 'cpp' in languages:
bugs_file_name = 'travis_macos_cpp_bugs.txt'
exclude_selectors += [
FileListExcluder(os.path.join(ROOTDIR, bugs_file_name),
verbose=verbose_excludes)
]
if options.use_common_utility_dir: if options.use_common_utility_dir:
common_utility_dir = os.path.join(WORKDIR, 'utility_code') common_utility_dir = os.path.join(WORKDIR, 'utility_code')
if not os.path.exists(common_utility_dir): if not os.path.exists(common_utility_dir):
......
complex_numbers_T305
complex_numbers_c99_T398
complex_numbers_cpp
complex_numbers_cxx_T398
cpdef_extern_func
cpp_classes_def
cpp_smart_ptr
cpp_stl_conversion
cpp_stl_function
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment