Bindings for Pango for using with Manim.
Project description
ManimPango
ManimPango is a C binding for Pango using Cython, which is internally used in Manim to render (non-LaTeX) text.
INSTALL
Installing ManimPango is super easy, just use pip
. It is manimpango
in PyPi.
pip install manimpango
For Linux Users, there are no Wheels. You must have a C compiler as well as Pango and its dependencies along with the Pango development headers. See BUILDING for more information.
WORKFLOW SETUP / CONTRIBUTING
To make it easier for developers to contribute, we have a pre-commit workflow that will check for black
formatting and flake
checking.
pip install pre-commit
pre-commit install
BUILDING
Linux/MacOS
For building ManimPango, you need
- a C compiler
- Python's development headers
pkg-config
- Pango along with its development headers and its dependencies.
If you are on MacOS, you can use brew to install those. Using MacPorts is also possible.
brew install pango pkg-config
If you are on Linux, you can use a system package manager to do so. For example, if you are on Debian based system, you can use apt
apt install libpango1.0-dev pkg-config python3-dev
Arch Linux: pacman -S pango pkgconf
Fedora: dnf install pango-devel pkg-config python3-devel
Or similar in your system's package manager.
Using tar
archives
If you don't want to contribute to this repository, you can use the tar archives published in PyPi, or just use pip
to install using
pip install manimpango --no-binary :all:
Note: pip
by default uses wheels, so make sure to pass the --no-binary
parameter.
Using git
clones / Contributing
Please remember to do this inside your virtual environment, if you want to use your Manimpango with Manim.
python -m venv ./venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
If you are using a clone of this repository, you will need Cython which can be easily installed using pip
:
pip install Cython
After that you can use pip
to install the clone with the following command:
pip install -e .
pip install -r requirements-dev.txt .
Next, run the setup script:
python setup.py build_ext -i
After installation is complete, you should be able to run pytest:
pytest
You will need to this way if you want to contribute to ManimPango.
Contributing with Windows
If you are a normal user, don't read this, you have wheels which you can just install directly using pip.
If you want to contribute to ManimPango and you are on Windows, this section is for you.
As Windows does not include a C compiler by default, you will first need to install one. You have two choices:
-
MinGW/Msys2
-
Visual Studio
MinGW/Msys2
- Download MSYS2 from the download link provided on their page https://www.msys2.org/#installation and install it according to their instructions.
- Once you have MSYS2 installed, it offers you three different shells: the MinGW32 shell, the MinGW64 shell and MSYS shell. In order for the following steps to work, you have to open the MSYS2 MinGW64 shell (you can search for this). Small hint: it has a blue color logo.
- Run the following commands to install Python, Pango, Cython, Numpy, Scipy, Pillow, Pycairo and ffmpeg
pacman -S mingw-w64-x86_64-python
pacman -S mingw-w64-x86_64-python-pip
pacman -S mingw-w64-x86_64-pango
pacman -S mingw-w64-x86_64-cython
pacman -S mingw-w64-x86_64-python-numpy
pacman -S mingw-w64-x86_64-python-scipy
pacman -S mingw-w64-x86_64-python-pillow
pacman -S mingw-w64-x86_64-python-cairo
pacman -S mingw-w64-x86_64-ffmpeg
- Still in the same shell, install Manim using
pip install manim
. - Finally, get your clone of ManimPango,
cd
into that directory and then runpip install -e .
. Note You can't use it with your regular Python version. It will cause weird errors if you do so. For working with ManimPango, you must be inside theMSYS2 MINGW64 shell
. - You can then use
manim
inside that shell, to run Manim. Hint: If you want to try out Python interactively, you can openidle
using the commandpython -m idlelib
inside that shell.
Visual Studio
First, install Visual Studio as specified in https://wiki.python.org/moin/WindowsCompilers. Possibly Visual Studio Build Tools 2022 with Windows10 SDK.
Then run the script at packing/download_dlls.py
. This will get a Pango build along with pkg-config
and install it at C:\cibw\vendor
. Add C:\cibw\vendor\bin
to PATH.
Note: You can change the install location by editing line 24 of the file packing/download_dlls.py
.
Then set an environment variable PKG_CONFIG_PATH
=C:\cibw\vendor\lib\pkgconfig
.
Then you can install Cython using
pip install Cython
Finally, you can install your local ManimPango clone just like any other python package by typing:
pip install .
Code of Conduct
Our full code of conduct, and how we enforce it, can be read on our website.
License
This project is licensed under MIT License. The wheels distributed on PyPI contains compiled version of Pango and Cairo subject to terms of the GNU LGPL and other licenses. Consult the licenses of each library for more informations.
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
Built Distributions
Hashes for ManimPango-0.6.0-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb13f56a41ba251f70fd57643dc42cee689a1ebbec5eaf305722c7100008e253 |
|
MD5 | e32723e6231628a475f7cf2dfca074b2 |
|
BLAKE2b-256 | 46a7cc2a049245b1bfd99989319e660732b18c1190c1c429c6b5dd04e79ea415 |
Hashes for ManimPango-0.6.0-cp313-cp313-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba6279fd087ac3ac0a64c24a8b47fa0bdf0c8351c177cd07e3e793252899bd2d |
|
MD5 | 02f71043d8e71d283c0a25c4bb765fa3 |
|
BLAKE2b-256 | ae65ea52fa1db9cf59f48b4726a1e6655ce2a2271f35ea4f11f0f2d497914624 |
Hashes for ManimPango-0.6.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67809f65ec10397361a2650069ccac9fcf64babf75daf58eb38d9bcfb49e968b |
|
MD5 | 1e1fdd4ee4d76957280773bef4ccf8db |
|
BLAKE2b-256 | a163fccfcd6b6748c3e50e0319cc976d27762543ac3f634c20d712b463677f41 |
Hashes for ManimPango-0.6.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5156dc1fa2a6321f64a4110aa9dbe0c5ba507839f947fa3dfc72b5c63d729c88 |
|
MD5 | d4ccb95a5858313154cc5870d14ec533 |
|
BLAKE2b-256 | d0a514daa990d391981582ebfaabac93aeb9abbd83b3fac98800e5fe06ace653 |
Hashes for ManimPango-0.6.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 061fd61a9f27df0c8ed75beb1fa4e5c06d5186eb37a5830a852aa3ac0737fcfe |
|
MD5 | 45608b086d48c528f19ff5c649041fac |
|
BLAKE2b-256 | b7e76355b4da8e8fd9e7160e36af0c280c17d02997a5d5eebeabd70bfa8cf5c8 |
Hashes for ManimPango-0.6.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a8e2c164e7f03e2152e94fd5bf597e977ef67fbbf1031c72f2254479fc892af |
|
MD5 | 8749cb466f06d1e826723bc71b1b236b |
|
BLAKE2b-256 | 566b1927deee84e5883f1e4c49d3d48814d7c0b4bdb026bfa5a5d81eacd7aa3b |
Hashes for ManimPango-0.6.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ab751239d82233d9c9ea1aa8f9cb23257733ee0607e82a76abc0cd75dde66e5 |
|
MD5 | ba19df71b5111a7aab769dd6a30d9ac8 |
|
BLAKE2b-256 | 4814787e62bf78d92e5aef5b797db442ba5b4bed95ab25b76a9be352f6736bbc |
Hashes for ManimPango-0.6.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d10bf902dbb66c98f28909ac9327296da141eaa696986a59b3459e3358d9a34 |
|
MD5 | f55562c69133efa64958a13190755f79 |
|
BLAKE2b-256 | e3e6e4e5cce79d4c8e4eeb3447349e32cf41494197732cfac01c60a6b521ed62 |
Hashes for ManimPango-0.6.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 386c4ea41cfbab2d68b1ccc982510cdd2a9aef25e63c92f6ac7d0dee48e3513b |
|
MD5 | e8aedb6083ffc9f2e2598b501e698df2 |
|
BLAKE2b-256 | 8a71a5fdb9cd985a38077c12c30a3f2af3303ea6d1081394c95c56dcc7acf9b0 |
Hashes for ManimPango-0.6.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6ba4d65bbc157705a92cb7f07bad0d8a82a392cec8b23347fa2e2f756793fbb |
|
MD5 | 3952ec997d46e7c9d3e96b0200fe08a1 |
|
BLAKE2b-256 | 5069e41e0b5db2c39884ac29705d906dcfbaf4684d60cbb4d68bca2ed05b1d9c |
Hashes for ManimPango-0.6.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d4c20845eb5920f5487e0929ac3dab517f623d1093ef1524ab7679b01b11fb |
|
MD5 | 28794989a729d9687f0237ae8f6caa0e |
|
BLAKE2b-256 | 298741ba1a0878fe23dcafcc72ccd869d1abed0213e9ab7b765e7db65d7579fe |
Hashes for ManimPango-0.6.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af1f631bc8fd925db351e0c9498aec8bf6639dcd3ad99ca5fce73766ad137640 |
|
MD5 | b451ddc39bb0e9649d4743cf2b925eba |
|
BLAKE2b-256 | 29a5dfa1c7eefc3fc790ab0ef6ce04e1b70bb24dc63e0bd4e1ce4a8f0bf2d787 |
Hashes for ManimPango-0.6.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1e1a86ed9e814cdd230958f7c9bb874400f6808bff29e6b76abc55faa9b4899 |
|
MD5 | 9f1b305067ce9ed03bccc472e47d1eba |
|
BLAKE2b-256 | 984e41ce1db7821d798621461ae8a937df84ddee9bd55be317dfcef14b7d5816 |
Hashes for ManimPango-0.6.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 287205a4c82e35b84c259a5f03068295d544b105d387457cb670c167e2a13598 |
|
MD5 | 9eb834292af22dee6c853f2e8bb08b24 |
|
BLAKE2b-256 | 419338f4f14ca49c2168db916efbc955eb90ab002db249770f2eed3269eb7a04 |
Hashes for ManimPango-0.6.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72d70b8110f1fb5641fe0d1c9483d10aa7cd190c099490ce809acfab3dce6b69 |
|
MD5 | 5b69538b4f53c5a5572dee9263c4e596 |
|
BLAKE2b-256 | dcc2be6564a0970a492959771ba002d0e084b83a6684c5246c917ce49a1b5652 |
Hashes for ManimPango-0.6.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 025605af4e789dad2d8895b0c820d4e5c8001929a2998a4a694518869f32e5f8 |
|
MD5 | 35614116d22d29e2c0f56801b1e2b80c |
|
BLAKE2b-256 | 8f556cf7142897a5d2b4cc918061de0e1dc3bf7e5936ffcdd92b93da46627e20 |
Hashes for ManimPango-0.6.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ae1b0f2fd4b4f1774dd5b2f4a3b834043d5ee42efc3dfb351755f4f548059d |
|
MD5 | 4541eadce5fd0099590b5219577bf593 |
|
BLAKE2b-256 | a8e4f70e1d39d8f24278b47bcf02623d10419002634844e6e2ae6ba27e337ceb |
Hashes for ManimPango-0.6.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9e515f9a79f7010c68efd9da19d5c11ba33bd139d1c53b0a18b73d9f20ce7d |
|
MD5 | 5ca9ebcb51dff16ac500e6ade98811a9 |
|
BLAKE2b-256 | 9b6dbffa80142277dbdff613425d1b9896fbe04a6dab1a1be3b2029648ce3b45 |
Hashes for ManimPango-0.6.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c0c1bb36588d4951d5560ce1ee6831f23f0f7d22c93b4fd9dcf0752908d9d57 |
|
MD5 | 5d2cfa3e18d835006baf6a44c0faa88d |
|
BLAKE2b-256 | b39b9155941ca713458353e90c35c85dd83699c0b426df805a10360d1da6e473 |
Hashes for ManimPango-0.6.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c88297f21091fb4031173f66bc55ea4e11d1df4412ba4edf3a5ccdb06dbf2c0f |
|
MD5 | bf188afff55ce0cbf7365c70a9cf80ec |
|
BLAKE2b-256 | 98e803cdf8c516fab20a7c92d675f73c7078fb397da626d1907864fca9ed7eca |