Commit Graph

33 Commits

Author SHA1 Message Date
Yung-Yu Chen
87f893b766 Temporarily allows osx homebrew Python 3.6 to fail (#572)
* Temporarily allows osx homebrew Python 3.6 to fail.

https://github.com/pybind/pybind11/pull/570#issuecomment-269120613

"Homebrew just got Python 3.6 (brew install python3), but numpy and scipy don't have binary wheels for 3.6 yet so it's trying to compile from source and failing."
2016-12-26 11:24:30 +01:00
Dean Moldovan
b0f3885c95 Make sure add_subdirectory and find_package behave identically
Add a BUILD_INTERFACE and a pybind11::pybind11 alias for the interface
library to match the installed target.

Add new cmake tests for add_subdirectory and consolidates the
.cpp and .py files needed for the cmake build tests:

Before:
tests
|-- test_installed_module
|   |-- CMakeLists.txt
|   |-- main.cpp
|   \-- test.py
\-- test_installed_target
    |-- CMakeLists.txt
    |-- main.cpp
    \-- test.py

After:
tests
\-- test_cmake_build
    |-- installed_module/CMakeLists.txt
    |-- installed_target/CMakeLists.txt
    |-- subdirectory_module/CMakeLists.txt
    |-- subdirectory_target/CMakeLists.txt
    |-- main.cpp
    \-- test.py
2016-12-19 16:34:48 +01:00
Wenzel Jakob
1d1f81b278 WIP: PyPy support (#527)
This commit includes modifications that are needed to get pybind11 to work with PyPy. The full test suite compiles and runs except for a last few functions that are commented out (due to problems in PyPy that were reported on the PyPy bugtracker).

Two somewhat intrusive changes were needed to make it possible: two new tags ``py::buffer_protocol()`` and ``py::metaclass()`` must now be specified to the ``class_`` constructor if the class uses the buffer protocol and/or requires a metaclass (e.g. for static properties).

Note that this is only for the PyPy version based on Python 2.7 for now. When the PyPy 3.x has caught up in terms of cpyext compliance, a PyPy 3.x patch will follow.
2016-12-16 15:00:46 +01:00
Jason Rhinelander
709e648c57 Add temporary allow_failure for python 2.7/gcc 6 (#562)
Current debian testing has Python 2.7.13-RC1, which has a serious
regression (upstream https://bugs.python.org/issue5322) which should be
reverted for RC2 (or the final 2.7.13).  Ignore build failures for this
build test temporarily (with the intention of reverting this commit in a
couple of weeks once it stops failing, i.e. when debian testing picks up
an updated python 2.7 release).
2016-12-15 22:49:09 +01:00
Jason Rhinelander
a3d41d103c Add gcc-7 build from debian experimental
Add a build using g++-7 snapshot from debian experimental.  This build
is set to allow failures without triggering an overall build failure
(since this is an experimental compiler with experimental support for a
future C++ standard).
2016-12-14 20:40:49 +01:00
Lori A. Burns
eb09af5e58 test installed pybind 2016-12-13 21:44:19 +01:00
Wenzel Jakob
f8571ea1bc workaround for sphinx/docutils issue
https://github.com/sphinx-doc/sphinx/issues/3212
2016-12-11 18:51:46 +01:00
Wenzel Jakob
8fadade225 add valarray to documentation, update docutils on travis 2016-12-09 16:08:16 +01:00
Dean Moldovan
bad1740213 Add checks to maintain a consistent Python code style and prevent bugs (#515)
A flake8 configuration is included in setup.cfg and the checks are
executed automatically on Travis:

* Ensures a consistent PEP8 code style
* Does basic linting to prevent possible bugs
2016-11-20 21:21:54 +01:00
Jason Rhinelander
219b10ac99 Update travis and appveyor builds to eigen 3.3.0 (#491) 2016-11-11 16:15:38 +09:00
Jason Rhinelander
5b4968df3a Make the gcc6/python 3.5 build use debug mode 2016-09-12 16:04:31 -04:00
Jason Rhinelander
bf14cea7c7 apt-get tweaks for the debian builds
- Try to update and upgrade twice (with a brief pause between attempts)
  to deal with occassional spurious server failures or repository race
  conditions.  Do the same for the main package install.
- Use dist-upgrade instead of upgrade for updating the image
- Add -q to the upgrade and install commands to make apt less verbose.
2016-09-10 00:04:09 -04:00
Jason Rhinelander
ac4278970c Check for tabs instead of spaces in the doc build
This adds a tool that checks style (currently just for tabs instead of
spaces in files under include/tests/docs) and produces a travis-ci build
failure if any problems are found.
2016-08-28 14:11:23 -04:00
Jason Rhinelander
dd3d56a885 Don't install pytest from cmake, just fail instead
Installing something outside the project directory from a cmake
invocation is overly intrusive; this changes tests/CMakeLists.txt to
just fail with an informative message instead, and changes the
travis-ci builds to install pytest via pip or apt-get.
2016-08-26 17:22:48 -04:00
Dean Moldovan
14bd10d6d6 Fix Travis cache config: remove ccache, add OS X pip cache
ccache on Travis was never configured properly so the setting never
actually did anything. Enabling ccache for real brings other issues:
due to the way the preprocessor is handled, some of the Python header
macros produce bogus compiler warnings (which in turn produce errors
with -Werror). ccache also requires additional configuration on OS X
and docker. It would reduce compile time by ~30 seconds at best, so
it's not worth the trouble.

[skip appveyor]
2016-08-26 11:53:25 +02:00
Dean Moldovan
b62a896f31 Add barebones build to Travis CI
This build makes sure everything still works without optional
dependencies (numpy/scipy/eigen) and also tests the automatic
discovery functions in CMake (Python version, C++ standard).

[skip appveyor]
2016-08-26 11:41:27 +02:00
Dean Moldovan
18319d5598 Automatically install pytest from CMake
Pytest is a development dependency but we can make it painless by
automating the install using CMake.
2016-08-19 13:32:01 +02:00
Dean Moldovan
a0c1ccf0a9 Port tests to pytest
Use simple asserts and pytest's powerful introspection to make testing
simpler. This merges the old .py/.ref file pairs into simple .py files
where the expected values are right next to the code being tested.

This commit does not touch the C++ part of the code and replicates the
Python tests exactly like the old .ref-file-based approach.
2016-08-19 13:19:38 +02:00
Jason Rhinelander
0b952cdf28 pip/venv in before_install; override install for docs build
Rather than adding an `if [ -n "$DOCS" ]` as a separate install
instruction, this simplifies the travis-ci logic to do the pip/venv
setup in the `before_install` hook, leaving the install hook to just
install the needed packages.

This makes the default install script simpler: it doesn't need to check
NATIVE_DEPS or DOCS because both of those now override `install`
anyway, so the top-level `install` is really just the install for the
gcc-4.8 and osx builds; the docker builds and docs build override
install completely.
2016-08-17 14:19:08 -04:00
Jason Rhinelander
4b5058dc2e Build docs just once, in a dedicated build
This switches the travis-ci build to build the docs in a dedicated
build rather than as part of the regular linux/osx builds.
2016-08-17 09:46:04 -04:00
Jason Rhinelander
7e016366fe Build sphinx docs with -W during travis-ci builds 2016-08-16 22:46:37 -04:00
Dean Moldovan
00a300950b Report warnings as errors on Travis and AppVeyor 2016-08-15 13:41:44 +02:00
Jason Rhinelander
024ce4471b Add g++-6 builds to travis-ci
The current linux/g++ testing (using a backported g++-4.8 on a
4-year-old Ubuntu) is quite ancient.  It's good as a baseline level of
support, but it means we aren't testing g++'s C++14 support at all
(which is why #334 happened).

This commit adds a docker-based travis-ci build using the debian
"testing" distribution, which will give us both another test system
(with different versions of build tools), while, more importantly, also
adding a build and test run using g++ in C++14 mode.
2016-08-14 22:32:30 -04:00
Dean Moldovan
880a7e4d0a Use system version of Python 2.7 on OS X on Travis 2016-08-02 01:19:19 +02:00
Dean Moldovan
3ac1275248 Improve CI test coverage: eigen, numpy and C++14 2016-07-30 17:18:33 +02:00
Dean Moldovan
ba0a0c063f Install numpy from manylinux binary wheel on Travis 2016-06-02 09:05:15 +02:00
Dean Moldovan
52ae7b1d33 Add 'check' target which both builds and tests 2016-06-02 09:05:15 +02:00
Dean Moldovan
b4b70a5d62 Update CMake on Travis CI 2016-05-22 22:45:11 +02:00
Omer Katz
f74c9236a5 Cache C/C++ compilation 2016-05-21 11:29:30 +03:00
Wenzel Jakob
a40c27ee0e travis: cache pip 2016-01-21 19:23:54 +01:00
Wenzel Jakob
5e90fa4e6a 32 bit build in Travis (disabled for now) 2015-11-24 23:17:03 +01:00
Wenzel Jakob
b1b714023a consistent macro naming throughout the project 2015-10-18 16:48:30 +02:00
Wenzel Jakob
3b806d41eb Added configuration files for Travis CI integration 2015-10-11 18:31:46 +02:00