Metadata-Version: 2.4
Name: nginx-wheel
Version: 1.31.3
Summary: Precompiled nginx binaries exposed as a Python environment script.
Author: HfCloud
License-Expression: BSD-2-Clause
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.0
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_LICENSES.md
Dynamic: license-file

# nginx-wheel

`nginx-wheel` packages nginx 1.31.3 binaries and exposes them as an
`nginx-wheel` command in the Python environment.

The `nginx-wheel` packaging code is BSD 2-Clause licensed. The bundled nginx
binaries include nginx and third-party modules under their own licenses; see
`THIRD_PARTY_LICENSES.md`.

Supported binaries:

| Platform | Architecture | Packaged file |
| --- | --- | --- |
| Linux | x86_64 | `nginx-1.31.3-x86_64-linux` |
| Linux | aarch64 | `nginx-1.31.3-aarch64-linux` |
| macOS | arm64 | locally built from `nginx-1.31.3` source |
| Windows | x86_64 | `nginx-1.31.3-x86_64-win32.exe` |

The Linux and Windows binaries come from
<https://github.com/jirutka/nginx-binaries>. The macOS arm64 binary is built
locally from the nginx 1.31.3 source tree so that its deployment target can be
set to macOS 11.0.

After installation, run:

```sh
nginx-wheel -V
```

Each platform wheel contains only the matching nginx binary. The installed
`nginx-wheel` console entry point resolves that binary, then replaces the Python
process with it on POSIX platforms. It intentionally does not install an
`nginx` command, so it will not shadow a system or user-installed nginx.

## Linux glibc

The packaged Linux x86_64 and aarch64 binaries are statically linked ELF
executables. A local `strings` check found no `GLIBC_` version references, so
these binaries do not declare a dynamic glibc symbol-version requirement.

## macOS deployment target

The packaged macOS arm64 binary is built locally from nginx 1.31.3 source using
the nginx module set from `nginx-binaries`, with
`MACOSX_DEPLOYMENT_TARGET=11.0` and `-mmacosx-version-min=11.0`. Local checks
show `LC_BUILD_VERSION minos 11.0`, and `otool -L` lists only
`/usr/lib/libSystem.B.dylib`.

## Build

```sh
python scripts/build_wheels.py
```

This produces platform-tagged wheels for all supported targets in `dist/`.
To build just one wheel, set `NGINX_WHEEL_TARGET` to one of
`linux-x86_64`, `linux-aarch64`, `macos-arm64`, or `windows-x86_64`, then run:

```sh
NGINX_WHEEL_TARGET=macos-arm64 python -m pip wheel . -w dist --no-deps
```
