the cython-based fractions system used for td2inner(an internal part of timediffz)
Project description
fractionalstd2inner
A high-performance Cython + GMP, very basic and custom implementation of Python’s built-in fractions library.
It is ~1.5× to 4× faster than the standard Python implementation and was made to be used internally by
td2inner.
⚠️ This package must be compiled locally.
No prebuilt wheels are provided.
⚠️ Important Notice (Read This First)
fractionalstd2inner contains a native Cython extension that depends on
GMP (GNU Multiple Precision Arithmetic Library).
Because of this:
- ❌ No prebuilt wheels
- ✅ Development tools are required
- ✅ Compilation occurs during
pip install
This is intentional.
🧩 Requirements
General
- Python ≥ 3.10
- C / C++ compiler
- Cython ≥ 3.2
- GMP development headers
INSTALLMENT STEPS
1 INSTALL DEPENDENCIES ASSUMING YOU ALREADY HAVE PYTHON AND PIP
Arch Linux
sudo pacman -S gmp base-devel cython
Ubuntu/Debian/Mint
sudo apt update
sudo apt install -y libgmp-dev build-essential python3-dev cython3
Fedora
sudo dnf install -y gcc gcc-c++ make automake gmp-devel python3-devel cython
CentOS/ RHEL
sudo yum groupinstall "Development Tools" -y
sudo yum install -y gmp-devel python3-devel cython
openSUSE
sudo zypper install -y gcc gcc-c++ make gmp-devel python3-devel cython
Windows(YOU NEED TO DOWNLOAD MSYS2) THEN
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-gmp mingw-w64-x86_64-python3-cython
MacOS(YOU NEED TO DOWNLOAD Homebrew(brew)) THEN
xcode-select --install
brew install gmp cython python
2 INSTALL THE LIBRARY ITSELF VIA PIP
python3 -m pip install fractionalstd2inner
3 VERIFY INSTALLATION VIA
python3 -c "import fractionalstd2inner; print(fractionalstd2inner.__version__)"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fractionalstd2inner-1.0.5.tar.gz
(94.0 kB
view details)
File details
Details for the file fractionalstd2inner-1.0.5.tar.gz.
File metadata
- Download URL: fractionalstd2inner-1.0.5.tar.gz
- Upload date:
- Size: 94.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
059404c37cdd6188f534e08f6a46f76e6ae2a97b2f794f6aaae36b6e36b7fa34
|
|
| MD5 |
3bed982eda9bb61da9e21ad13db185c5
|
|
| BLAKE2b-256 |
395fe11419dffacd82020d08a72c225767bbd62c138025b490cff7b3156f86e1
|