Installation¶
libpresign provides pre-built wheels for most platforms, making installation quick and easy.
Requirements¶
- Python 3.8 or higher
- pip 19.3 or higher (for manylinux2014 support)
Quick Install¶
Supported Platforms¶
libpresign provides pre-built binary wheels for the following platforms:
Platform | Architecture | Python Versions |
---|---|---|
Linux | x86_64 | 3.8-3.13 |
Linux | aarch64 | 3.8-3.13 |
macOS | x86_64 | 3.8-3.13 |
macOS | arm64 (Apple Silicon) | 3.8-3.13 |
Windows | AMD64 | 3.8-3.13 |
Platform Notes
- Linux wheels are manylinux2014 compatible
- macOS wheels are universal2 when possible
- Windows wheels require Visual C++ 2015-2022 Redistributable
Verify Installation¶
After installation, verify that libpresign is working correctly:
import libpresign
# Check version
print(f"libpresign version: {libpresign.__version__}")
# Test basic functionality
url = libpresign.get(
access_key_id="test",
secret_access_key="test",
region="us-east-1",
bucket="test-bucket",
key="test.txt"
)
print(f"Generated URL: {url[:50]}...")
Installing from Source¶
If pre-built wheels are not available for your platform, you can build from source.
Prerequisites¶
- C++ compiler with C++11 support
- CMake 3.15 or higher
- OpenSSL 3.x development files
- Python development headers
Build and Install¶
# Clone the repository
git clone https://github.com/myk0la-b/libpresign.git
cd libpresign
# Install build dependencies
pip install -U pip build
# Build and install
pip install .
Development Installation¶
For development work, install in editable mode with development dependencies:
# Using uv (recommended)
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
# Using pip
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
Troubleshooting¶
ImportError: libpresign module not found¶
This usually means the C extension failed to build. Check that:
- You have a C++ compiler installed
- OpenSSL development files are available
- Python development headers are installed
OpenSSL not found during build¶
Unsupported platform¶
If your platform is not supported by pre-built wheels, you'll need to build from source. Please ensure all prerequisites are installed.
Next Steps¶
Now that you have libpresign installed, check out the Quick Start guide to learn how to use it.