
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Install and use reduce with ease in Python.
pip install reduce-binary
import reduce_binary
print(reduce_binary.REDUCE_BIN_PATH)
reduce_binary.run_reduce("-h") # like subprocess.run(["reduce", "-h"])
reduce_binary.popen_reduce("-h") # like subprocess.Popen(["reduce", "-h"])
# For no-argument case, pass an empty string
reduce_binary.run_reduce("") # like subprocess.run(["reduce"])
# Pass a list of arguments
reduce_binary.run_reduce(["-Trim", "input.pdb"])
There exists a wrapper function.
from reduce_binary.helpers import protonate
protonate(
"input.pdb",
"output.pdb",
remove_hydrogen_first=True,
print_stderr=False,
)
Supported platforms:
[!NOTE] Installing the package does NOT put the binary in $PATH.
Instead, the API will tell you where it is located.
Go to Github Actions and run the Build and Release
workflow.
Version rule:
e.g.: 4.14.0.2
Go to Github Actions and run the Build and Release
workflow, with "Dry run" checked.
It will build and test the wheels on all platforms, without releasing them to PyPI.
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 4.14 manylinux_2_17_x86_64.manylinux2014_x86_64
bash build_python.sh 4.14 macosx_10_12_x86_64
bash build_python.sh 4.14 macosx_11_0_arm64
Test the wheel
uv venv
source .venv/bin/activate
uv pip install -r requirements_test.txt
uv pip install build_python/dist/*.whl
pytest
FAQs
Install reduce with pip
We found that reduce-binary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.