|
1 | 1 | python_example
|
2 | 2 | ==============
|
3 | 3 |
|
| 4 | +[![Gitter][gitter-badge]][gitter-link] |
| 5 | + |
| 6 | +| CI | status | |
| 7 | +|----------------------|--------| |
| 8 | +| Linux/macOS Travis | [![Travis-CI][travis-badge]][travis-link] | |
| 9 | +| MSVC 2015 | [![AppVeyor][appveyor-badge]][appveyor-link] | |
| 10 | +| conda.recipe | [![Conda Actions Status][actions-conda-badge]][actions-conda-link] | |
| 11 | +| pip builds | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] | |
| 12 | +| [`cibuildwheel`][] | [![Wheels Actions Status][actions-wheels-badge]][actions-wheels-link] | |
| 13 | + |
| 14 | +[gitter-badge]: https://badges.gitter.im/pybind/Lobby.svg |
| 15 | +[gitter-link]: https://gitter.im/pybind/Lobby |
| 16 | +[actions-badge]: https://github.com/pybind/python_example/workflows/Tests/badge.svg |
| 17 | +[actions-conda-link]: https://github.com/pybind/python_example/actions?query=workflow%3A%22Test+conda-build%22 |
| 18 | +[actions-conda-badge]: https://github.com/pybind/python_example/workflows/Test%20conda-build/badge.svg |
| 19 | +[actions-pip-link]: https://github.com/pybind/python_example/actions?query=workflow%3A%22Test+pip+build%22 |
| 20 | +[actions-pip-badge]: https://github.com/pybind/python_example/workflows/Test%20pip%20build/badge.svg |
| 21 | +[actions-wheels-link]: https://github.com/pybind/python_example/actions?query=workflow%3AWheels |
| 22 | +[actions-wheels-badge]: https://github.com/pybind/python_example/workflows/Wheels/badge.svg |
| 23 | +[travis-link]: https://travis-ci.org/pybind/python_example |
| 24 | +[travis-badge]: https://travis-ci.org/pybind/python_example.svg?branch=master&status=passed |
| 25 | +[appveyor-link]: https://ci.appveyor.com/project/wjakob/python-example |
| 26 | +<!-- TODO: get a real badge link for appveyor --> |
| 27 | +[appveyor-badge]: https://travis-ci.org/pybind/python_example.svg?branch=master&status=passed |
| 28 | + |
4 | 29 | An example project built with [pybind11](https://github.com/pybind/pybind11).
|
| 30 | +Warning: this is currently using a pre-release of pybind11 2.6.0, since the |
| 31 | +infrastructure for building pure Python examples has been heavily improved |
| 32 | +there. |
5 | 33 |
|
6 | 34 | Installation
|
7 | 35 | ------------
|
@@ -32,30 +60,22 @@ Installation
|
32 | 60 | Note that this requires the user building `python_example` to have registry edition
|
33 | 61 | rights on the machine, to be able to run the `vcvarsall.bat` script.
|
34 | 62 |
|
| 63 | +CI Examples |
| 64 | +----------- |
| 65 | + |
| 66 | +There are examples for CI in `.github/workflows`. A simple way to produces |
| 67 | +binary "wheels" for all platforms is illustrated in the "wheels.yml" file, |
| 68 | +using [`cibuildwheel`][]. You can also see a basic recipe for building and |
| 69 | +testing in `pip.yml`, and `conda.yml` has an example of a conda recipe build. |
35 | 70 |
|
36 |
| -Windows runtime requirements |
| 71 | +Windows Python 2.7 runtime requirements |
37 | 72 | ----------------------------
|
38 | 73 |
|
39 | 74 | On Windows, the Visual C++ 2015 redistributable packages are a runtime
|
40 | 75 | requirement for this project if you build for Python 2.7 (newer versions of
|
41 | 76 | Python include this redistributable). It can be found
|
42 | 77 | [here](https://www.microsoft.com/en-us/download/details.aspx?id=48145).
|
43 | 78 |
|
44 |
| -If you use the Anaconda python distribution, you may require the Visual Studio |
45 |
| -runtime as a platform-dependent runtime requirement for you package: |
46 |
| - |
47 |
| -```yaml |
48 |
| -requirements: |
49 |
| - build: |
50 |
| - - python |
51 |
| - - setuptools |
52 |
| - - pybind11 |
53 |
| - |
54 |
| - run: |
55 |
| - - python |
56 |
| - - vs2015_runtime # [win] |
57 |
| -``` |
58 |
| -
|
59 | 79 |
|
60 | 80 | Building the documentation
|
61 | 81 | --------------------------
|
@@ -83,3 +103,5 @@ Test call
|
83 | 103 | import python_example
|
84 | 104 | python_example.add(1, 2)
|
85 | 105 | ```
|
| 106 | + |
| 107 | +[`cibuildwheel`]: https://cibuildwheel.readthedocs.io |
0 commit comments