Skip to main content

Bindings for Pango for using with Manim.

Project description

ManimPango

PyPI Latest Release PyPI - Wheel PyPI - Downloads PyPI - License PyPI - Python Version Documentation Status

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, but their version of Pango is old and will probably not be updated in the near future.

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:

  1. MinGW/Msys2

  2. Visual Studio

MinGW/Msys2

  1. Download MSYS2 from the download link provided on their page https://www.msys2.org/#installation and install it according to their instructions.
  2. 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.
  3. 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
  1. Still in the same shell, install Manim using pip install manim.
  2. Finally, get your clone of ManimPango, cd into that directory and then run pip 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 the MSYS2 MINGW64 shell.
  3. You can then use manim inside that shell, to run Manim. Hint: If you want to try out Python interactively, you can open idle using the command python -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 2019 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 and C:\cibw\vendor\pkg-config\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 .

Important: You have to to use https://docs.python.org/3/library/os.html#os.add_dll_directory before running ManimPango. Alternatively, you need to copy the dll at C:\cibw\vendor\bin to the folder where ManimPango is compiled. This is applicable for Python 3.8 and above.

import os
os.add_dll_directory('C:\cibw\vendor\bin')

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


Download files

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

Source Distribution

ManimPango-0.4.2.tar.gz (4.1 MB view details)

Uploaded Source

Built Distributions

ManimPango-0.4.2-cp311-cp311-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

ManimPango-0.4.2-cp311-cp311-win32.whl (3.4 MB view details)

Uploaded CPython 3.11 Windows x86

ManimPango-0.4.2-cp311-cp311-macosx_10_9_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

ManimPango-0.4.2-cp310-cp310-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

ManimPango-0.4.2-cp310-cp310-win32.whl (3.4 MB view details)

Uploaded CPython 3.10 Windows x86

ManimPango-0.4.2-cp310-cp310-macosx_10_9_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

ManimPango-0.4.2-cp39-cp39-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

ManimPango-0.4.2-cp39-cp39-win32.whl (3.4 MB view details)

Uploaded CPython 3.9 Windows x86

ManimPango-0.4.2-cp39-cp39-macosx_10_9_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

ManimPango-0.4.2-cp38-cp38-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

ManimPango-0.4.2-cp38-cp38-win32.whl (3.4 MB view details)

Uploaded CPython 3.8 Windows x86

ManimPango-0.4.2-cp38-cp38-macosx_10_9_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

ManimPango-0.4.2-cp37-cp37m-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.7m Windows x86-64

ManimPango-0.4.2-cp37-cp37m-win32.whl (3.4 MB view details)

Uploaded CPython 3.7m Windows x86

ManimPango-0.4.2-cp37-cp37m-macosx_10_9_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file ManimPango-0.4.2.tar.gz.

File metadata

  • Download URL: ManimPango-0.4.2.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for ManimPango-0.4.2.tar.gz
Algorithm Hash digest
SHA256 7ce708b33f21682af90a2872852c06bb589a24bbb9ff723159245c7539acdaaa
MD5 7b0045d0767d472f303a629ec95ba743
BLAKE2b-256 675fa19dbefb9bdc8997987bf2322dc31d9ca45cdad0c757cdf93181deef5229

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 28312a2e0d8f7a9f0470e3601f127b17e924300d6eec06841b5b2b9f3de812b4
MD5 36735bd6bf8344279117e0938d25f64a
BLAKE2b-256 21ff2f96efb3e5ae7d142d4aba0c3c0ffd9751560c9b44b306fec5bc998e762a

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp311-cp311-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.2-cp311-cp311-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for ManimPango-0.4.2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 ad2679e1652ce0213dcd03afc00817a6f17ac0545fcc5b92f2b84ef4d6c87bbd
MD5 b51641ce388c56112926507cd4bc76be
BLAKE2b-256 56d3fb05609b759eca6757c6ffcc761be2359bb6ac1c0b90a2a7182f482a8ba0

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 902c706284722aed9ff8c6b0daae62afc03070552448f37e9c3156d79149c259
MD5 e39f1826e34f2e45df0b6d13d52c9db4
BLAKE2b-256 fb224db9db62f4c2d8a42572fe96fbd62d70ed5e63220a9e302c18567e317e0e

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0ba9ab614af515122fa5fcb216dd088b0c3d1c358157b7e2290c56d487e38e0a
MD5 f7ac6d8b57fa7615602fbfa89954a67c
BLAKE2b-256 63b1581b0a70145ea5b554c62b4922f8d5513cbdf588757f6b98851bbb2bbb37

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp310-cp310-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.2-cp310-cp310-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for ManimPango-0.4.2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 f2bf1aa936b87907e958d1b37900f67fadee5ab34f1c51d1cd8f0bb3e099ba2d
MD5 03ea9fa3fd8c12e26d413183f4dc0132
BLAKE2b-256 a0daa72399c1161862d16e53306908477907ca6b2e5503dd1de571f78dfb7044

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 71e2451057ffaa9f12d598ac13d8fa3b363427f81d25e31803f0426c946dbc09
MD5 7e0dc097346080c087c6454fa1ace2fb
BLAKE2b-256 b4c1f7f6a5f63deec84e865c6cc2648a3b008860203b0897be88d51b39565a9c

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 37744cad3f2c88c19acf58140cdea677e9dc1be9e94144d849292016526a54db
MD5 2ae1260eaadb8acf6c7c44b3b7a9363c
BLAKE2b-256 94db12b7282190f2c72667ddbb82d4e494dbfe2332472c202d0e7abffe88d95a

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp39-cp39-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for ManimPango-0.4.2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 04f59c9861ceb8b99fc8b6b97d8ac9ec549805d688f48536f70204ab51ca004d
MD5 fce0ce53e8fc2932ddb0772615d0e0c7
BLAKE2b-256 8c520d7e30b9b7c17cc65b8a039364cba1c67d500b1ed3168fdc5c8d3ddbf056

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a80b26598873a3b4b4801ae32d59a35b93fafd9edfaec9b8ab34f27965560c4b
MD5 20a2dabf471944d523a0eef0e6283549
BLAKE2b-256 de0b4f7fdcaf05b5a9f143eb2b687283aa4c2f0f7fab1b05a31798e51e31943b

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2737f1265f5b7d6a0496a28d340bed99e2721540a2daec734070c6b87940c799
MD5 5c64b1a45889341e387b87db3df59b18
BLAKE2b-256 fc754551ddc926347e2e6bb74d5b14dddd1fa160fc16b75842f0e52e74066a0c

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp38-cp38-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for ManimPango-0.4.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 a9c1d1c5fae5aa3a809a058313f0382d0236a8cf59fec6b09a5fa746c8d1b743
MD5 c7e3fb01fcd0e9261f6a468ba97ac6ee
BLAKE2b-256 a4a43a7a824fd7f526f533b6f7ac47c05f00329f6428b17fae8d07b6bb2ba864

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e445e16ec123fab75025f123d766f0dc16d7d4ccd59d7dafe7766ed28df75d34
MD5 c107884b7e4ad5a375a994e4f847c1a4
BLAKE2b-256 ae4c626747f5b0ba2e0bf3ed17258eeabe011b7abfcba3e548edaea233182c69

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e222d2fe7a89d6908d3108fb5e8b5220919db2f1bb61bca0feaf83be0087b1d6
MD5 1c7163b313df29db8d9408afd13abc84
BLAKE2b-256 3d797509d13a60df2b4753d0606cb76a676027d2c409c1fbb98ea0f7cc13dee6

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for ManimPango-0.4.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 07acb7010f2a17ce0d725dd562e57ac32c973639d3e3d6e539e161e6d21501e3
MD5 07b9d6f9044cb879d12294d7ba548161
BLAKE2b-256 5af4ab872bdbef66ae0035c4a230e8e7f6c2e4382a4acc1fcbed926096e1c090

See more details on using hashes here.

Provenance

File details

Details for the file ManimPango-0.4.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ManimPango-0.4.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ab48d514c8f5331e14f00b4dcfaafff468a7277a2ec6ba8501fd6a6efeda478d
MD5 cc451a0cbcb2c6d2125bc40f8a495f7a
BLAKE2b-256 4e48e5286940c1ed918947b1dd93eddc58ea253afa7ab4b3397727c8ffaf8a40

See more details on using hashes here.

Provenance

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