Browse Source

Miscellaneous CI fixes (addresses #32)

master
Wenzel Jakob 6 years ago
parent
commit
08a2f37d8a
  1. 8
      .appveyor.yml
  2. 16
      .travis.yml
  3. 3
      setup.py

8
.appveyor.yml

@ -6,6 +6,7 @@ platform:
environment: environment:
global: global:
DISTUTILS_USE_SDK: 1 DISTUTILS_USE_SDK: 1
PYTHONWARNINGS: ignore:DEPRECATION
MSSdk: 1 MSSdk: 1
matrix: matrix:
- PYTHON: 27 - PYTHON: 27
@ -32,9 +33,14 @@ build_script:
- ps: | - ps: |
if ($env:PYTHON) { if ($env:PYTHON) {
python setup.py sdist python setup.py sdist
pip install --verbose dist\python_example-0.0.1.tar.gz python -m pip install 'pybind11>=2.3'
cd dist
python -m pip install --verbose python_example-0.0.1.tar.gz
cd ..
} else { } else {
echo "conda build conda.recipe"
conda build conda.recipe conda build conda.recipe
echo "conda install --use-local python_example"
conda install --use-local python_example conda install --use-local python_example
} }
test_script: test_script:

16
.travis.yml

@ -5,7 +5,7 @@ matrix:
- os: linux - os: linux
env: PYTHON=2.7 env: PYTHON=2.7
- os: linux - os: linux
env: PYTHON=3.5 env: PYTHON=3.6
- os: linux - os: linux
env: CONDA=2.7 env: CONDA=2.7
- os: linux - os: linux
@ -22,11 +22,14 @@ before_install:
- | - |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
if [ -n "$PYTHON" ]; then if [ -n "$PYTHON" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "${PYTHON:0:1}" = "3" ]; then if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update; brew install python3; export PATH="/Users/travis/Library/Python/2.7/bin:$PATH"
if [ "${PYTHON:0:1}" = "3" ]; then
brew update; brew install python3;
fi
fi fi
pip install --user --upgrade pip virtualenv python -m pip install --user virtualenv
virtualenv -p python$PYTHON venv virtualenv -p python${PYTHON:0:1} venv
source venv/bin/activate source venv/bin/activate
elif [ -n "$CONDA" ]; then elif [ -n "$CONDA" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=Linux-x86_64; else OS=MacOSX-x86_64; fi if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=Linux-x86_64; else OS=MacOSX-x86_64; fi
@ -44,7 +47,8 @@ install:
- | - |
if [ -n "$PYTHON" ]; then if [ -n "$PYTHON" ]; then
python setup.py sdist python setup.py sdist
pip install --verbose dist/*.tar.gz python -m pip install 'pybind11>=2.3'
python -m pip install --verbose dist/*.tar.gz
elif [ -n "$CONDA" ]; then elif [ -n "$CONDA" ]; then
conda build conda.recipe conda build conda.recipe
conda install --use-local python_example conda install --use-local python_example

3
setup.py

@ -106,7 +106,8 @@ setup(
description='A test project using pybind11', description='A test project using pybind11',
long_description='', long_description='',
ext_modules=ext_modules, ext_modules=ext_modules,
install_requires=['pybind11>=2.2'], install_requires=['pybind11>=2.3'],
setup_requires=['pybind11>=2.3'],
cmdclass={'build_ext': BuildExt}, cmdclass={'build_ext': BuildExt},
zip_safe=False, zip_safe=False,
) )

Loading…
Cancel
Save