Node.js PyPI distribution

This repository contains the script used to repackage the releases of Node.js as Python binary wheels. This document is intended for maintainers; see the package README for rationale and usage instructions.

The repackaged artifacts are published as the node-js PyPI package.

This tool is based on the work of the creators of the Zig language, see the original. Thank you!

Preparation

The script requires Python 3.5 or later.

Install the dependencies:

pip install wheel twine libarchive-c

The libarchive-c Python library requires the native libarchive library to be available.

Building wheels

Run the repackaging script:

python make_wheels.py

This command will download the Node.js release archives for every supported platform and convert them to binary wheels, which are placed under dist/. The Node.js version and platforms are configured in the script source.

The process of converting release archives to binary wheels is deterministic, and the output of the script should be bit-for-bit identical regardless of the environment and platform it runs under. To this end, it prints the SHA256 hashes of inputs and outputs; the hashes of the inputs will match the ones on the Node.js downloads page, and the hashes of the outputs will match the ones on the PyPI downloads page.

Uploading wheels

Run the publishing utility:

twine dist/*

This command will upload the binary wheels built in the previous step to PyPI.

License

This script is distributed under the terms of the MIT (Expat) license.

GitHub

View Github