Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
99da4323
Commit
99da4323
authored
Oct 18, 2017
by
Lisandro Dalcin
Committed by
GitHub
Oct 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1937 from cython/travis-ci
Travis-CI: Setup macOS builds
parents
23e8254f
f18a9519
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
24 deletions
+88
-24
.travis.yml
.travis.yml
+60
-21
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+10
-1
Demos/embed/Makefile
Demos/embed/Makefile
+2
-1
runtests.py
runtests.py
+7
-1
tests/travis_macos_cpp_bugs.txt
tests/travis_macos_cpp_bugs.txt
+9
-0
No files found.
.travis.yml
View file @
99da4323
language
:
python
os
:
linux
dist
:
trusty
sudo
:
false
addons
:
apt
:
packages
:
-
gdb
-
python-dbg
-
python3-dbg
cache
:
pip
:
true
directories
:
-
$HOME/.ccache
language
:
python
python
:
-
2.7
-
3.6
...
...
@@ -30,17 +38,67 @@ env:
-
BACKEND=c
-
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
:
only
:
-
master
-
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
:
-
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
-
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
:
-
PYTHON_DBG="python$( python -c 'import sys; print("%d.%d" % sys.version_info[:2])' )-dbg"
...
...
@@ -48,22 +106,3 @@ script:
-
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="-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
Cython/Utility/ModuleSetupCode.c
View file @
99da4323
...
...
@@ -512,16 +512,25 @@
#define CYTHON_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if
(defined(__GNUC__) || defined(__clang__)) &&
__has_attribute(fallthrough)
#if __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#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
/////////////// CInitCode ///////////////
...
...
Demos/embed/Makefile
View file @
99da4323
# Makefile for creating our standalone Cython program
PYTHON
:=
python
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(
))
"
)
PLATINCDIR
:=
$(
shell
$(PYTHON)
-c
"from distutils import sysconfig; print(sysconfig.get_python_inc(plat_specific=True
))
"
)
...
...
@@ -31,5 +32,5 @@ clean:
@
rm
-f
*
~
*
.o
*
.so core core.
*
*
.c embedded test.output
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
runtests.py
View file @
99da4323
...
...
@@ -253,7 +253,6 @@ def update_cpp11_extension(ext):
update cpp11 extensions that will run on versions of gcc >4.8
"""
gcc_version = get_gcc_version(ext.language)
compiler_version = gcc_version.group(1)
if gcc_version is not None:
compiler_version = gcc_version.group(1)
if float(compiler_version) > 4.8:
...
...
@@ -2089,6 +2088,13 @@ def runtests(options, cmd_args, coverage=None):
sys.stderr.write("Backends: %s
\
n
" % ','.join(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:
common_utility_dir = os.path.join(WORKDIR, 'utility_code')
if not os.path.exists(common_utility_dir):
...
...
tests/travis_macos_cpp_bugs.txt
0 → 100644
View file @
99da4323
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment