Skip to main content

Install reduce with pip

Project description

pip install reduce-binary (unofficial)

build

image PyPI - Downloads image image

Install and use reduce with ease in Python.

pip install reduce-binary
from reduce_binary import REDUCE_BIN_PATH, reduce
print(REDUCE_BIN_PATH)
reduce("-h")

Supported platforms:

  • Linux x86_64
  • MacOS x86_64, arm64 (Intel and Apple Silicon)

[!NOTE] Installing the package does NOT put the binary in $PATH.
Instead, the API will tell you where it is located.

👨‍💻️ Maintenance Notes

Releasing a new version with CI (recommended)

Go to Github Actions and run the Build and Release workflow.

Version rule:

4.14.post2: 4.14 is the reduce version, postN can increase with the changes of the package and the builds.

Running locally

This section describes how it works.

To run it locally, first install the dependencies:

pip install uv --user --break-system-packages
uv tool install wheel
uv tool install build

# Mac
brew install gnu-sed

Build the app at buiid/ (reduce):

# Linux
bash build_reduce_linux.sh v4.14
# Mac (Intel)
MACOSX_DEPLOYMENT_TARGET=10.12 bash build_reduce_mac.sh v4.14
# Mac (Apple Silicon)
MACOSX_DEPLOYMENT_TARGET=11.0 bash build_reduce_mac.sh v4.14

[!NOTE] Linux build uses an old version of ubuntu docker to be compatible with old systems.
It also checks if the glibc dependency is lower than 2.17.
In the future you may need to increase this version in the script.

[!NOTE] The MACOSX_DEPLOYMENT_TARGET is the cmake flag.
https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html

Build the wheel. It copies the python to build_python/, built binary into it, modifies the version number and builds the wheel in build_python/dist/.:

# One of the following
bash build_python.sh wheel 4.14 manylinux_2_17_x86_64.manylinux2014_x86_64
bash build_python.sh wheel 4.14 macosx_10_12_x86_64
bash build_python.sh wheel 4.14 macosx_11_0_arm64
bash build_python.sh sdist 4.14  # not used

Test the wheel

uv venv
source .venv/bin/activate
uv pip install -r requirements_test.txt
uv pip install build_python/dist/*.whl
pytest

✅ TODO

  • Cross-compile for Linux
  • Windows build
  • CHANGELOG and publish to releases

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

reduce_binary-4.14.post6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (13.6 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

reduce_binary-4.14.post6-py3-none-macosx_11_0_arm64.whl (13.6 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

reduce_binary-4.14.post6-py3-none-macosx_10_12_x86_64.whl (13.6 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

File details

Details for the file reduce_binary-4.14.post6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for reduce_binary-4.14.post6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 bc9a653afdab865f4385db954c4ca78491c91f7367a97fb071198f20721a8545
MD5 a3ac0f013fc3d583c59a04f251a1c3b3
BLAKE2b-256 aba8af73f35fcb0e93b42ad0dc7b0cd1531ffd30c1ecdabe49da57cb4eb81bb7

See more details on using hashes here.

File details

Details for the file reduce_binary-4.14.post6-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for reduce_binary-4.14.post6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82862bc0acb131758d453561e9a3268b2973456782d7aeb370f0a507db588462
MD5 130a6cd13b776a19040dbec737dc0bcb
BLAKE2b-256 374b1158ac7b173e03a80b6292ed8f450993b8a8eacf446707e8765918ef489a

See more details on using hashes here.

File details

Details for the file reduce_binary-4.14.post6-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for reduce_binary-4.14.post6-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8161f407a027f4b04f8e24d25172bf0f30cce96bc3bc1a4be306a33d1fd28e70
MD5 53f62695e9098429489de152e5764626
BLAKE2b-256 ecb5769a91d749ff38668936520ae8f68c966d993b55025c538e90fbdedd5d91

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page