You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .ci/azure-wheel-helpers/README.md
+57-15Lines changed: 57 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,15 @@
1
1
## Azure Wheel Helpers
2
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.
3
+
This repository holds a collection of wheel helpers designed by the
4
+
[Scikit-HEP][] project to build Python Wheels on [Azure DevOps][]. This is
5
+
designed for packages that require building; if you have a pure-Python project,
6
+
producing a universal wheel is trivial without this helper collection. This
7
+
collection assumes some standard paths and procedures, though *some* of them
8
+
can be customized.
4
9
5
-
Azure provides manual pipeline triggering and release pipelines, making it slighly better suited for this than GitHub Actions, though otherwise they are *very* similar.
10
+
Azure provides manual pipeline triggering and release pipelines, making it
11
+
slighly better suited for this than GitHub Actions, though otherwise they are
12
+
*very* similar.
6
13
7
14
### Supported platforms and caveats
8
15
@@ -17,10 +24,22 @@ TLDR: Python 2.7, 3.6, 3.7, and 3.8 on all platforms, along with 3.5 on Linux.
17
24
| Windows | 64 & 32-bit | 2.7, 3.6, 3.7, 3.8 |
18
25
19
26
* Linux: Python 3.4 is not supported because Numpy does not support it either.
20
-
* 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.
21
-
* 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. Optional modern GCC image available.
22
-
* 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).
23
-
* 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).
27
+
* manylinux1: Optional support for GCC 9.1 using docker image; should work but
28
+
can't be called directly other compiled extensions unless they do the same
29
+
thing (think that's the main caveat). Supporting 32 bits because it's there
30
+
for Numpy and PPA for now.
31
+
* manylinux2010: Requires pip 10+ and a version of Linux newer than 2010. This
32
+
is very new technology. 64-bit only. Eventually this will become the
33
+
preferred (and then only) way to produce Linux wheels. Optional modern GCC
34
+
image available.
35
+
* MacOS: Uses the dedicated 64 bit 10.9+ Python.org builds. We are not
36
+
supporting 3.5 because those no longer provide binaries (could use 32+64 fat
37
+
10.6+ but really force to 10.9+, but will not be added unless there is a need
38
+
for it).
39
+
* Windows: PyBind11 requires compilation with a newer copy of Visual Studio
40
+
than Python 2.7's Visual Studio 2008; you need to have the [Visual Studio
41
+
2015 distributable][msvc2015] installed (the dll is included in 2017 and
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. You must have a `test_requirments` file, as the manylinux wheel install test does not pull requirements when testing, and at least pytest is required.
75
+
You can adjust the rest of the template as needed. If you need a non-standard
76
+
procedure, you can change the target of the `template` inputs to a local file.
77
+
You must have a `test_requirments` file, as the manylinux wheel install test
78
+
does not pull requirements when testing, and at least pytest is required.
As always, you can make a remote to shorten these commands.
96
+
97
+
66
98
### Common needs
67
99
68
100
#### Using numpy with Cython
69
101
70
-
If you build with Cython, you will need to require an older version of Numpy. Either place this in your `dev_requirements_file` (classic builds) or your `pyproject.toml` (PEP 517 builds):
102
+
If you build with Cython, you will need to require an older version of Numpy.
103
+
Either place this in your `dev_requirements_file` (classic builds) or your
104
+
`pyproject.toml` (PEP 517 builds):
71
105
72
106
```
73
107
numpy==1.11.3; python_version<="3.5"
74
108
numpy==1.12.1; python_version=="3.6"
75
-
numpy==1.14.5; python_version=='3.7'
76
-
numpy==1.17.3; python_version>='3.8'
109
+
numpy==1.14.5; python_version=="3.7"
110
+
numpy==1.17.3; python_version>="3.8"
77
111
```
78
112
79
-
(Note: most of Scikit-HEP officially requires 1.13.3+, so you can simplify this with a single `<='3.6'`)
113
+
(Note: most of Scikit-HEP officially requires 1.13.3+, so you can simplify this
114
+
with a single `<='3.6'`)
80
115
81
116
#### Using PEP 517 builds
82
117
83
-
For PEP 517 builds, you need to have a pyproject.toml file. Then, for PIP > 10, the build happens in a
84
-
custom environment that has *only* the packages you request. It replaces the deprecated and mostly non-functional `setup_requires` in setup.py, and even lets you select a build system other than setuptools. If you just use it as a replacement for `setup_requires`, you can still support pip < 10; users will just have to manually install the requirements (usually Numpy) beforehand. Here's an example of a Cython PEP 517 build:
118
+
For PEP 517 builds, you need to have a pyproject.toml file. Then, for PIP > 10,
119
+
the build happens in a custom environment that has *only* the packages you
120
+
request. It replaces the deprecated and mostly non-functional `setup_requires`
121
+
in setup.py, and even lets you select a build system other than setuptools. If
122
+
you just use it as a replacement for `setup_requires`, you can still support
123
+
pip < 10; users will just have to manually install the requirements (usually
124
+
Numpy) beforehand. Here's an example of a Cython PEP 517 build:
85
125
86
126
```toml
87
127
[build-system]
@@ -95,7 +135,8 @@ requires = [
95
135
]
96
136
```
97
137
98
-
Now, in `setup.py`, just `import numpy` and use it, no need to check to see if it there, etc.
138
+
Now, in `setup.py`, just `import numpy` and use it, no need to check to see if
Since `setuptools>=18.0`, you can now pass `.pyx` files directly as sources to `Extension`, and they get Cythonized for you! You just need Cython installed.
154
+
Since `setuptools>=18.0`, you can now pass `.pyx` files directly as sources to
155
+
`Extension`, and they get Cythonized for you! You just need Cython installed.
0 commit comments