惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
S
Securelist
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Schneier on Security
Schneier on Security
Attack and Defense Labs
Attack and Defense Labs
Vercel News
Vercel News
腾讯CDC
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
Netflix TechBlog - Medium
量子位
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
Cyberwarzone
Cyberwarzone
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News and Events Feed by Topic
T
Tenable Blog
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
W
WeLiveSecurity
N
News | PayPal Newsroom
P
Proofpoint News Feed
O
OpenAI News
C
CERT Recently Published Vulnerability Notes
B
Blog
Cisco Talos Blog
Cisco Talos Blog
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy

Lobsters

Lunacy | Red Vice CIFSwitch: a non-universal Linux local root vulnerability RIPE NCC session fixation: poaching logins with an Atlas probe GNOME 2.20 but its Web Components Agentic Search for Context Engineering – Leonie Monigatti Garnix is shutting down [not OC] akashina.tngl.sh/jjc Concerning Emacs (and Jazz) Nitpicking the shell history scene in ‘Tron: Legacy’ What's cooking on SourceHut? Q2 2026 The tenth OpenPGP email summit Package managers that package package managers Clojure on Fennel part three: parsing WordPress at 23 Finding Miscompiles for Fun, Not Profit GitHub - creusot-rs/creusot: Creusot helps you prove your Rust code is correct. Announcing Rust 1.96.0 | Rust Blog A Love Letter to Neovim sqlite AGENTS.md Am I a Bad Friend? CSS vs. JavaScript • Josh W. Comeau Erlang Ecosystem Foundation - Supporting the BEAM community A brief note about slot access cost in Common Lisp Keyboard latency probe Rethinking the GNOME clipboard issues Back to the Building Blocks’ Building Blocks Tech Notes: Theseus: translating win32 to wasm Fast is better than slow Content-addressed Rust builds (or, what kache actually caches) Intent to Prototype: Embedding API Canada’s Bill C-22 and the security cost of collecting more data 5 PostgreSQL locking behaviors that trip people up okmij.org Stop advertising in your commits! | AksDev GitHub - mplsllc/macsurf: A modern web browser for Classic Mac OS 9 PowerPC. Real CSS3, ES5 JavaScript, native HTTPS — built with CodeWarrior on the Carbon API. Introducing DoomBench - Can Your Data Stack Run DOOM? What are some of your favourite developer tools? Building a Scalable Ingestion Pipeline with Temporal (Part 1) Converting shallow Git bundles into normal repositories Are you a member of any professional associations? What is a harmonic? An interactive comic about additive synthesis How Virtual Tables Work in the Itanium C++ ABI Using SwiftUI to Build a Mac-assed App in 2026 Rust (and Slint) on a jailbroken Kindle. ~jack/lambda-on-lambda - Serverless Haskell on AWS - sourcehut git Human proof for FOSS contributions Extremely simple internet radio controlled via IRC Announcing BABLR Splitting Konsole views from Helix to run tools | AksDev GitHub - yugr/rust-slides Serving files over HTTP three ways: synchronous, epoll, and io_uring A Simple Makefile Tutorial On C extensions, portability, and alternative compilers Switching to Colemak | Pedro Alves Just How Bad Was The Intel IAPX432? Nix's Substituter List Is Not a Routing Table Accelerating copy_if using SIMD Lambda on Lambda: Serverless Haskell on AWS | Blog Announcing feed-repeat v1.0 Scaling Akvorado BMP RIB with sharding EYG news: A host of CLI improvements, new guides and new effects The social contract of writing JS Crossword C array types are weird; and related topics Flatpak will depend on systemd – OSnews Migrating from Go to Rust | corrode Rust Consulting A portentous reunion Vivado Licensing Options How my minimal, memory-safe Go rsync steers clear of vulnerabilities the entropy layer of a wavelet codec, on its own GitHub - nferhat/fht-compositor: A dynamic tiling Wayland compositor. Debian SE Linux and PinTheft Does bulk memmove speed up std::remove_if? (No.) 声明式部分更新 | Blog | Chrome for Developers Fully in-browser container builds Dianne Skoll's Web Site - Remind The Architecture of Open Source Applications (Volume 1)Berkeley DB Pardon MIE? - ironPeak Blog “Long-Term Support” doesn’t mean what you think Jira IS Turing-Complete May I recommend thinking of Emacs as your Fortress of Solitude hershey Floodgap Gopher-HTTP gateway gopher://thelambdalab.xyz/1cuneiforth/ HP QuickWeb, Singular And Pointless That one time I used Go panics for flow control A new suite of modern tools coming for editing and publishing RFCs From the Tabletop… The Digital Antiquarian Building a Host-Tuned GCC to Make GCC Compile Faster Are we self-sovereign PKI yet? Claw Patrol: an open-source security firewall for agents | Deno Revised^7 Report on Scheme, Large: Procedural Fascicle Draft is now public A Network Allow-List Won't Stop Exfiltration — André Graf From AFSK to Goertzel – µArt.cz Software For My New Home Server Introducing Neptune: Direct3D virtualization for QEMU AI Agent Bankrupted Their Operator While Trying to Scan DN42 - Lan Tian @ Blog mimalloc: A new, high-performance, scalable memory allocator for the modern era Making wl_shm fast The Soul of Maintaining a New Machine - Third Draft | Books in Progress What is Git made of?
update docs with information about building with build.py (#979) · astral-sh/python-build-standalone@c9c40c5
github.com v · 2026-05-26 · via Lobsters

@@ -4,79 +4,81 @@

44

Building

55

========

667-

Linux

8-

=====

7+

A Python distribution can be built on a Linux, macOS or Windows host.

8+

Regardless of the operating system, `uv <https://docs.astral.sh/uv/>`_ must be installed.

9+

Additional operating system requirements are needed and outlined in the following sections.

91010-

The host system must be 64-bit. A Python 3.10+ interpreter must be

11-

available. The execution environment must have access to a Docker

12-

daemon (all build operations are performed in Docker containers for

13-

isolation from the host system).

11+

Regardless of the host, to build a Python distribution::

12+13+

$ uv run build.py

14+15+

On Linux and macOS, ``./build.py`` can also be used.

16+17+

To build a different version of Python::

18+19+

$ uv run build.py --python cpython-3.14

142015-

To build a Python distribution for Linux x64::

21+

Various build options can be specified::

162217-

$ ./build-linux.py

18-

# With profile-guided optimizations (generated code should be faster):

19-

$ ./build-linux.py --options pgo

23+

# With profile-guided optimizations (generated code should be faster)

24+

$ uv run build.py --options pgo

2025

# Produce a debug build.

21-

$ ./build-linux.py --options debug

26+

$ uv run build.py --options debug

2227

# Produce a free-threaded build without extra optimizations

23-

$ ./build-linux.py --options freethreaded+noopt

28+

$ uv run build.py --options freethreaded+noopt

242925-

You can also build another version of Python. e.g.::

30+

Different platforms support different build options.

31+

``uv run build.py --help`` will show the available build options and other usage information.

263227-

$ ./build-linux.py --python cpython-3.13

283329-

To build a Python distribution for Linux x64 using musl libc::

34+

Linux

35+

=====

303631-

$ ./build-linux.py --target x86_64-unknown-linux-musl

37+

The host system must be x86-64 or aarch64.

38+

The execution environment must have access to a Docker

39+

daemon (all build operations are performed in Docker containers for

40+

isolation from the host system).

324133-

Building a 32-bit x86 Python distribution is also possible::

42+

``build.py`` accepts a ``--target-triple`` argument to support building

43+

for non-native targets (i.e. cross-compiling).

344435-

$ ./build-linux.py --target i686-unknown-linux-gnu

45+

This option can be used to build for musl libc::

364637-

As are various other targets::

47+

$ ./build.py --target-triple x86_64-unknown-linux-musl

384839-

$ ./build-linux.py --target aarch64-unknown-linux-gnu

40-

$ ./build-linux.py --target armv7-unknown-linux-gnueabi

41-

$ ./build-linux.py --target armv7-unknown-linux-gnueabihf

42-

$ ./build-linux.py --target loongarch64-unknown-linux-gnu

43-

$ ./build-linux.py --target mips-unknown-linux-gnu

44-

$ ./build-linux.py --target mipsel-unknown-linux-gnu

45-

$ ./build-linux.py --target ppc64le-unknown-linux-gnu

46-

$ ./build-linux.py --target riscv64-unknown-linux-gnu

47-

$ ./build-linux.py --target s390x-unknown-linux-gnu

49+

Or on a x86-64 host for different architectures::

485049-

Additionally, an arm64 macOS host can be used to build Linux aarch64 targets

50-

using Docker::

51+

$ ./build.py --target-triple i686-unknown-linux-gnu

52+

$ ./build.py --target-triple armv7-unknown-linux-gnueabi

53+

$ ./build.py --target-triple armv7-unknown-linux-gnueabihf

54+

$ ./build.py --target-triple loongarch64-unknown-linux-gnu

55+

$ ./build.py --target-triple mips-unknown-linux-gnu

56+

$ ./build.py --target-triple mipsel-unknown-linux-gnu

57+

$ ./build.py --target-triple ppc64le-unknown-linux-gnu

58+

$ ./build.py --target-triple riscv64-unknown-linux-gnu

59+

$ ./build.py --target-triple s390x-unknown-linux-gnu

516052-

$ ./build-linux.py --target aarch64-unknown-linux-gnu

53615462

macOS

5563

=====

566457-

The XCode command line tools must be installed. A Python 3 interpreter

58-

is required to execute the build. ``/usr/bin/clang`` must exist.

65+

The XCode command line tools must be installed.

66+

``/usr/bin/clang`` must exist.

596760-

macOS SDK headers must be installed. Try running ``xcode-select --install``

61-

to install them if you see errors about e.g. ``stdio.h`` not being found.

62-

Verify they are installed by running ``xcrun --show-sdk-path``. It

63-

should print something like

68+

macOS SDK headers must be installed.

69+

If you see errors such as ``stdio.h`` not being found, try running ``xcode-select --install`` to install them.

70+

Verify they are installed by running ``xcrun --show-sdk-path``.

71+

It should print something like

6472

``/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk``

6573

on modern versions of macOS.

667467-

To build a Python distribution for macOS::

75+

The ``--target-triple`` argument can be used to build for an Intel Mac on an arm64 (Apple Silicon) host::

687669-

$ ./build-macos.py

77+

$ ./build.py --target-triple x86_64-apple-darwin

707871-

macOS uses the same build code as Linux, just without Docker.

72-

So similar build configuration options are available.

79+

Additionally, an arm64 macOS host can be used to build Linux aarch64 targets using Docker::

738074-

``build-macos.py`` accepts a ``--target-triple`` argument to support building

75-

for non-native targets (i.e. cross-compiling). By default, macOS builds target

76-

the currently running architecture. e.g. an Intel Mac will target

77-

``x86_64-apple-darwin`` and an M1 (ARM) Mac will target ``aarch64-apple-darwin``.

78-

It should be possible to build an ARM distribution on an Intel Mac and an Intel

79-

distribution on an ARM Mac.

81+

$ ./build.py --target-triple aarch64-unknown-linux-gnu

80828183

The ``APPLE_SDK_PATH`` environment variable is recognized as the path

8284

to the Apple SDK to use. If not defined, the build will attempt to find

@@ -89,24 +91,17 @@ an Intel 10.15 machine (as long as the 11.0+ SDK is used).

8991

Windows

9092

=======

919392-

Visual Studio 2017 (or later) is required. A compatible Windows SDK is required

93-

(10.0.17763.0 as per CPython 3.7.2).

94-95-

* A ``git.exe`` on ``PATH`` (to clone ``libffi`` from source).

96-

* An installation of Cygwin with the ``autoconf``, ``automake``, ``libtool``,

97-

and ``make`` packages installed. (``libffi`` build dependency.)

98-99-

To build a dynamically linked Python distribution for Windows x64::

100-101-

$ py.exe build-windows.py --options noopt

102-103-

It's also possible to build with optional PGO optimizations::

94+

Visual Studio 2022 (or later) is required.

95+

A compatible Windows SDK is required (10.0.26100.0 as of CPython 3.10).

96+

A ``git.exe`` must be on ``PATH`` (to clone ``libffi`` from source).

97+

Cygwin must be installed with the ``autoconf``, ``automake``, ``libtool``,

98+

and ``make`` packages. (``libffi`` build dependency.)

10499105-

$ py.exe build-windows.py --options pgo

100+

Building can be done from the ``x64 Native Tools Command Prompt``, by calling

101+

the vcvars batch file, or by adjusting the ``PATH`` and environment variables.

106102107-

You will need to specify the path to a ``sh.exe`` installed from cygwin. e.g.

103+

You will need to specify the path to ``sh.exe`` from cygwin::

108104109-

$ py.exe build-windows.py --python cpython-3.13 --sh c:\cygwin\bin\sh.exe --options noopt

105+

$ uv run build.py --sh c:\cygwin\bin\sh.exe

110106111-

To build a 32-bit x86 binary, simply use an ``x86 Native Tools

112-

Command Prompt`` instead of ``x64``.

107+

To build a 32-bit x86 binary, simply use an ``x86 Native Tools Command Prompt`` instead of ``x64``.