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.0.post1.tar.gz (4.1 MB view details)

Uploaded Source

Built Distributions

ManimPango-0.4.0.post1-cp310-cp310-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 Windows x86

ManimPango-0.4.0.post1-cp310-cp310-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

ManimPango-0.4.0.post1-cp39-cp39-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

ManimPango-0.4.0.post1-cp39-cp39-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

ManimPango-0.4.0.post1-cp38-cp38-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

ManimPango-0.4.0.post1-cp38-cp38-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

ManimPango-0.4.0.post1-cp37-cp37m-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

ManimPango-0.4.0.post1-cp37-cp37m-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file ManimPango-0.4.0.post1.tar.gz.

File metadata

  • Download URL: ManimPango-0.4.0.post1.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for ManimPango-0.4.0.post1.tar.gz
Algorithm Hash digest
SHA256 0e328f4240c736aef5d3ddffc6852f5ee57df92d85cdfffb7cf38a98ecd56410
MD5 b96feab91bf89a8fcd44307d7c3d9a8a
BLAKE2b-256 772e543ae1cb3bb22bfd94d8f0b016487e446960cb020e3a24f937ea5c969aa4

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 21ba0e0de8e932e0ee73ad9885ff3b656fbd235ebe64d3e6d7edf9a92c517da3
MD5 2c0bb4c7a1518077b69233b172003771
BLAKE2b-256 0a6e26a4fb0cc7e746515446dbdca955bba6b0a52a696ac61c8f71786814d116

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp310-cp310-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 1ee4689f92a0c8ed101466b6d99c94b8669b84ec36ef1799459c46fb8e882d78
MD5 8599dc544cc6de3650dc89d54cbafd18
BLAKE2b-256 ffdb23c721d10fc09ee69a6bd39494bd39a63421163ea95c8b4ea968996f10f9

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6a19dc2c1585df78744b7ba236358b5dfba5a9c27d9d24fb1cc1473a1581c7ad
MD5 cb25d722ced5777fe01a42c5a5a9d0ed
BLAKE2b-256 a20f531c72fb42880569cadb23f9f124aa38bfb994bd4e193387a4802a87de3e

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 13297babaf073c626f882fef3ab02f6e607d636bf879f264a2baacf8a1a6799a
MD5 e99cf9a7b39957c86bb678a31a642785
BLAKE2b-256 9bd21c1b4dce58fe911a5ce387bfbc7482b09956208636e7ff7880afce5b5f0f

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp39-cp39-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 342d28eb6aa6518f3ac07847ecce5fdd7f9f37ce185335e6605a2d8bee640fbb
MD5 79e769fa28ba4c31f16166b258944a0e
BLAKE2b-256 5ace5c45b02bc9ac5a01323bc1ba640eb7103ebb8f3c2584493405121b13fb36

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1b8e9ac296eb0950a187520ee09e791ce86ecfb2f7542d5bbec6e075113e8a2a
MD5 84a50d613bc66ba39a1db6848ea00d3e
BLAKE2b-256 c9596074b8e5fb2a3c542c9bf2737f7577cf458f8a34cd525889039ed5a4ebb5

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 455243a305b04714fcd2f680ae33541dc08234264782e6b091059021b815b773
MD5 eced683b69cc68c82ed45c87927dc707
BLAKE2b-256 9ced326bfac9bace80bf436efdeea27f43a160d83c19c53097e2daec4411250e

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp38-cp38-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f74ed6ed083000503df654f5610bc97fd25534f149c92668b1efb24cb98f93e5
MD5 32886115b5548c85ced9ac47e0144f7e
BLAKE2b-256 277f96f9a0a632fb705cc61db1abf9410b1720360bf2a905040fa4faf0616026

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ac0b88f73b9f5e35d29132405afa392bcbfd9f54913c1cda57d9d23b77f22faa
MD5 fa992c90ea83800a4610a60b901b5d90
BLAKE2b-256 bbc646d83953cfd42fe96d3dac136d731e8db0b5d1186b3809e2f634beae98a2

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 d62b5d45078e17abe27dfe870cb459acfdd16fff2782f93fbd5abbe0e7328cc0
MD5 ceca796290f774e9ac81627ffe262197
BLAKE2b-256 35463fd00879c9ed039d203a35f7dd7f8b92423d87fbba84eec9a12a00783a27

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp37-cp37m-win32.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 d3dbdd36d9e66484a3f85c214d8a5839920d476b2411ddec9fe2ff278cf0ed2d
MD5 785a47a415036b706706fceb5d1fc62f
BLAKE2b-256 451b7aceb94edb3bf01f9e5ae0ad72d30f5ba0c9b431aa2a619ff5bd8f83b59f

See more details on using hashes here.

File details

Details for the file ManimPango-0.4.0.post1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ManimPango-0.4.0.post1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ManimPango-0.4.0.post1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fcec272715074baca219423bbe5b98eac3156308ea77291f7fe584eac9d54fd9
MD5 64509bb358cb02d9de8b512f4e016d31
BLAKE2b-256 6fdaf43cb5bd00172d0cb6453d97b6082c79f24b41e785749623f6ff84a17476

See more details on using hashes here.

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