Skip to content

Commit 5aea30f

Browse files
committed
Setting macOS deployment target globally
1 parent 2b49938 commit 5aea30f

File tree

3 files changed

+59
-15
lines changed

3 files changed

+59
-15
lines changed

.ci/azure-build-pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ variables:
2727
dev_requirements_file: dev-requirements.txt
2828
test_requirements_file: dev-requirements.txt
2929
NPY_NUM_BUILD_JOBS: 4
30+
MACOSX_DEPLOYMENT_TARGET: 10.9
3031

3132

3233
jobs:

.ci/azure-wheel-helpers/README.md

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
## Azure Wheel Helpers
22

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.
49

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.
613

714
### Supported platforms and caveats
815

@@ -17,10 +24,22 @@ TLDR: Python 2.7, 3.6, 3.7, and 3.8 on all platforms, along with 3.5 on Linux.
1724
| Windows | 64 & 32-bit | 2.7, 3.6, 3.7, 3.8 |
1825

1926
* 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
42+
2019, as well).
2443

2544
[msvc2017]: https://www.microsoft.com/en-us/download/details.aspx?id=48145
2645

@@ -50,9 +69,13 @@ variables:
5069
many_linux_base: "quay.io/pypa/manylinux1_" # Could also be "skhep/manylinuxgcc-"
5170
dev_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt
5271
test_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt
72+
MACOSX_DEPLOYMENT_TARGET: 10.9
5373
```
5474
55-
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.
5679

5780

5881
#### Updates
@@ -63,25 +86,42 @@ To update, run:
6386
git subtree pull --prefix .ci/azure-wheel-helpers [email protected]:scikit-hep/azure-wheel-helpers.git master --squash
6487
```
6588

89+
If you make changes inside the folder and want to contribute back, run:
90+
91+
```bash
92+
git subtree push --prefix=.ci/azure-wheel-helpers [email protected]:scikit-hep/azure-wheel-helpers.git my_fixup_branch
93+
```
94+
95+
As always, you can make a remote to shorten these commands.
96+
97+
6698
### Common needs
6799

68100
#### Using numpy with Cython
69101

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):
71105

72106
```
73107
numpy==1.11.3; python_version<="3.5"
74108
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"
77111
```
78112

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'`)
80115

81116
#### Using PEP 517 builds
82117

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:
85125

86126
```toml
87127
[build-system]
@@ -95,7 +135,8 @@ requires = [
95135
]
96136
```
97137

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
139+
it there, etc.
99140

100141
#### Using Numpy parallel compile
101142

@@ -110,7 +151,8 @@ distutils.ccompiler.CCompiler.compile = CCompiler_compile
110151

111152
#### Using Cython + Setuptools
112153

113-
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.
114156

115157
### License
116158

.ci/azure-wheel-helpers/azure-pipeline-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ variables:
2929
many_linux_base: quay.io/pypa/manylinux1_
3030
dev_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt
3131
test_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt
32+
MACOSX_DEPLOYMENT_TARGET: 10.9
3233

3334

3435
jobs:

0 commit comments

Comments
 (0)