@@ -224,16 +224,16 @@ guide includes an introduction to writing a
224224Building binary extensions
225225==========================
226226
227- Setting up a build environment on Windows
228- -----------------------------------------
227+ Binary extensions for Windows
228+ -----------------------------
229229
230230Before it is possible to build a binary extension, it is necessary to ensure
231231that you have a suitable compiler available. On Windows, Visual C is used to
232232build the official CPython interpreter, and should be used to build compatible
233233binary extensions.
234234
235235Python 2.7 used Visual Studio 2008, Python 3.3 and 3.4 used Visual Studio 2010,
236- and Python 3.5+ uses Visual Studio 2015. Unfortunately, older versions of
236+ and Python 3.5+ uses Visual Studio 2015 or later . Unfortunately, older versions of
237237Visual Studio are no longer easily available from Microsoft, so for versions
238238of Python prior to 3.5, the compilers must be obtained differently if you do
239239not already have a copy of the relevant version of Visual Studio.
@@ -261,7 +261,7 @@ To set up a build environment for binary extensions, the steps are as follows:
261261
262262 For Python 3.5
263263
264- 1. Install `Visual Studio 2015 Community Edition
264+ 1. Install `Visual Studio 2015 Community Edition
265265 <https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx> `__
266266 (or any later version, when these are released).
267267 2. Done.
@@ -270,15 +270,28 @@ Note that from Python 3.5 onwards, Visual Studio works in a backward
270270compatible way, which means that any future version of Visual Studio will
271271be able to build Python extensions for all Python versions from 3.5 onwards.
272272
273- ::
273+ Building with the recommended compiler on Windows ensures that a compatible C library
274+ is used throughout the Python process.
274275
275- FIXME
276+ Binary extensions for Linux
277+ ---------------------------
276278
277- cover Windows binary compatibility requirements
278- cover macOS binary compatibility requirements
279- cover the vagaries of Linux distros and other *nix systems
279+ Linux binaries must use a sufficiently old glibc to be compatible with older
280+ distributions. The `manylinux <https://github.com/pypa/manylinux >`_ Docker
281+ images provide a build environment with a glibc old enough to support most
282+ current Linux distributions on common architectures.
280283
284+ Binary extensions for macOS
285+ ---------------------------
281286
287+ Binary compatibility on macOS is determined by the target minimum deployment
288+ system, e.g. *10.9 *, which is often specified with the
289+ ``MACOSX_DEPLOYMENT_TARGET `` environmental variable when building binaries on
290+ macOS. When building with setuptools / distutils, the deployment target is
291+ specified with the flag ``--plat-name ``, e.g. ``macosx-10.9-x86_64 ``. For
292+ common deployment targets for macOS Python distributions, see the `MacPython
293+ Spinning Wheels wiki
294+ <https://github.com/MacPython/wiki/wiki/Spinning-wheels> `_.
282295
283296Publishing binary extensions
284297============================
@@ -292,6 +305,7 @@ For interim guidance on this topic, see the discussion in
292305
293306 cover publishing as wheel files on PyPI or a custom index server
294307 cover creation of Windows and macOS installers
308+ cover weak linking
295309 mention the fact that Linux distros have a requirement to build from
296310 source in their own build systems, so binary-only releases are strongly
297311 discouraged
@@ -306,6 +320,16 @@ dealing with the underlying technical challenges. The additional resources in th
306320section are instead intended for developers looking to understand more about the
307321underlying binary interfaces that those systems rely on at runtime.
308322
323+ Cross-platform wheel generation with scikit-build
324+ -------------------------------------------------
325+
326+ The `scikit-build <https://scikit-build.readthedocs.io/en/latest/ >`_ package
327+ helps abstract cross-platform build operations and provides additional capabilities
328+ when creating binary extension packages. Additional documentation is also available on
329+ the `C runtime, compiler, and build system generator
330+ <https://scikit-build.readthedocs.io/en/latest/generators.html> `_ for Python
331+ binary extension modules.
332+
309333Introduction to C/C++ extension modules
310334---------------------------------------
311335
0 commit comments