|
| 1 | +## Azure Wheel Helpers |
| 2 | + |
| 3 | +This repository holds a collection of wheel helpers designed by the [Scikit-HEP][] project to build Python Wheels on [Azure DevOps][]. This is designed for packages that require building; if you have a pure-Python project, producing a universal wheel is trivial without this helper collection. This collection assumes some standard paths and procedures, though *some* of them can be customized. |
| 4 | + |
| 5 | +### Supported platforms and caveats |
| 6 | + |
| 7 | +TLDR: Python 2.7, 3.6, 3.7, and 3.8 on all platforms, along with 3.5 on Linux. |
| 8 | + |
| 9 | +| System | Arch | Python versions | |
| 10 | +|---------|-----|------------------| |
| 11 | +| SDist (all) | all | any (non-binary distribution) | |
| 12 | +| ManyLinux1 (custom GCC 8.3) | 64 & 32-bit | 2.7, 3.5, 3.6, 3.7, 3.8 | |
| 13 | +| ManyLinux2010 | 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8 | |
| 14 | +| macOS 10.9+ | 64-bit | 2.7, 3.6, 3.7, 3.8 | |
| 15 | +| Windows | 64 & 32-bit | 2.7, 3.6, 3.7, 3.8 | |
| 16 | + |
| 17 | +* Linux: Python 3.4 is not supported because Numpy does not support it either. |
| 18 | +* manylinux1: Optional support for GCC 9.1 using docker image; should work but can't be called directly other compiled extensions unless they do the same thing (think that's the main caveat). Supporting 32 bits because it's there for Numpy and PPA for now. |
| 19 | +* manylinux2010: Requires pip 10+ and a version of Linux newer than 2010. This is very new technology. 64-bit only. Eventually this will become the preferred (and then only) way to produce Linux wheels. |
| 20 | +* MacOS: Uses the dedicated 64 bit 10.9+ Python.org builds. We are not supporting 3.5 because those no longer provide binaries (could use 32+64 fat 10.6+ but really force to 10.9+, but will not be added unless there is a need for it). |
| 21 | +* Windows: PyBind11 requires compilation with a newer copy of Visual Studio than Python 2.7's Visual Studio 2008; you need to have the [Visual Studio 2015 distributable][msvc2015] installed (the dll is included in 2017 and 2019, as well). |
| 22 | + |
| 23 | +[msvc2017]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 |
| 24 | + |
| 25 | +### Usage |
| 26 | + |
| 27 | +> Azure does not recognize git submodules during the configure phase. Therefore, we are using git subtree instead. |
| 28 | +
|
| 29 | +This repository should reside in `/.ci` in your project. To add it: |
| 30 | + |
| 31 | +```bash |
| 32 | +git subtree add --prefix .ci/azure-wheel-helpers [email protected]:scikit-hep/azure-wheel-helpers.git master --squash |
| 33 | +``` |
| 34 | + |
| 35 | +You should make a copy of the template pipeline and make local edits: |
| 36 | + |
| 37 | +```bash |
| 38 | +cp .ci/azure-wheel-helpers/azure-pipeline-build.yml .ci/azure-pipeline-build.yml |
| 39 | +``` |
| 40 | + |
| 41 | +Make sure you enable this path in Azure as the pipeline. See [the post here][iscinumpy/wheels] for more details. |
| 42 | + |
| 43 | +You must set the variables at the top of this file, and remove any configurations (like Windows) that you do not support: |
| 44 | + |
| 45 | +```yaml |
| 46 | +variables: |
| 47 | + package_name: my_package # This is the output name, - is replaced by _ |
| 48 | + many_linux_base: "quay.io/pypa/manylinux1_" # Could also be "skhep/manylinuxgcc-" |
| 49 | + dev_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt |
| 50 | + test_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt |
| 51 | +``` |
| 52 | +
|
| 53 | +You can adjust the rest of the template as needed. If you need a non-standard procedure, you can change the target of the `template` inputs to a local file. |
| 54 | + |
| 55 | + |
| 56 | +### License |
| 57 | + |
| 58 | +Copyright (c) 2019, Henry Schreiner. |
| 59 | + |
| 60 | +Distributed under the 3-clause BSD license, see accompanying file LICENSE |
| 61 | +or <https://github.com/scikit-hep/azure-wheel-helpers> for details. |
| 62 | + |
| 63 | + |
| 64 | +[Scikit-HEP]: http://scikit-hep.org |
| 65 | +[Azure DevOps]: https://dev.azure.com |
| 66 | +[iscinumpy/wheels]: https://iscinumpy.gitlab.io/post/azure-devops-python-wheels/ |
| 67 | +[msvc2017]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 |
| 68 | + |
0 commit comments