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.

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

Uploaded Source

Built Distributions

ManimPango-0.3.1-cp310-cp310-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

ManimPango-0.3.1-cp310-cp310-win32.whl (3.3 MB view details)

Uploaded CPython 3.10 Windows x86

ManimPango-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

ManimPango-0.3.1-cp39-cp39-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

ManimPango-0.3.1-cp39-cp39-win32.whl (3.3 MB view details)

Uploaded CPython 3.9 Windows x86

ManimPango-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

ManimPango-0.3.1-cp38-cp38-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

ManimPango-0.3.1-cp38-cp38-win32.whl (3.3 MB view details)

Uploaded CPython 3.8 Windows x86

ManimPango-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

ManimPango-0.3.1-cp37-cp37m-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.7m Windows x86-64

ManimPango-0.3.1-cp37-cp37m-win32.whl (3.3 MB view details)

Uploaded CPython 3.7m Windows x86

ManimPango-0.3.1-cp37-cp37m-macosx_10_9_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: ManimPango-0.3.1.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for ManimPango-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a3a7e5a417507e9ccf307f6da40291a9fc2757a3c9a04de33dd18e92f63fcc25
MD5 a67bd14a4fd9e034dd48216403c4b0ed
BLAKE2b-256 5e0400af048a5d3a645a053e39db4b3e61da3a8b1b95b6f0d718684028207575

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f8979a4497dca2db3ccd3a97abb103b79800129686d328d051f554dcb6469f73
MD5 4fd5fc9ae957a8717a8e35115e8dc600
BLAKE2b-256 bb6d26257a01c798de530565147c1e4186169cbfd72ea74ac19347d92e4e7eec

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 89656d49c46c292bde7ec66849296f915ef577c66ce729e1d8c72e065f1d69d4
MD5 47043c808680a3a5a458805df0ede3bc
BLAKE2b-256 dc2939c25aad6ae6a076fafcdc8ac33a4e5571c99595e2e2391a26ed0109bad2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for ManimPango-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9c4ccdbd4f362874d9d175cfe436ff186057bb6f1fd8954fd5f61696596c760b
MD5 344c5739cce6d9fefc0e1d32e756d7df
BLAKE2b-256 703928fbcdefb95a29f690dab7e9d019d4eaaee1b8434e1d05669643ceed8d2e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2777e3b1f2e1d9c65eb4c7ffa2de44d3c93624fe946599a3a0ea43ca211436ac
MD5 29116641f7710a14ca94ed9078045e1a
BLAKE2b-256 e632423593804865cf0562243ad8c0097dc0ba74c39ef47a332426d43caf13ef

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 b46d7569fbf24b6e81ad4cec835f5fa105fe9a442f476714d51c453f7be775a9
MD5 288c24284db1629258a8bbd144490185
BLAKE2b-256 aaca4d2f375d2e05b47b5f3617530e0154692766fc681dfc021d2daad2ed668a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for ManimPango-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f7d41464ffbf98c6dc31defe590d097ddce868c9ce0a8e3b77de8c9c71be57c0
MD5 37521ed605f5e7d46e0feaeda9e48f21
BLAKE2b-256 570bd06ebf484320eeb58c5a064b258e307ae7e824598a68b608fb9c4c9f1867

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 11d90de082fae9d3fd60eff22907b054819062cb383d1ec72a93af9cb79dd6da
MD5 5461b965a542aeb3fddbcedf02558157
BLAKE2b-256 18b9ae099c2774a286b016db44dfdc1132156510ac0d792844bb7896b78973e3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 4c18466650953282f71caefe9451aebb7c834209f3a75dc6aa99dc10f6360d47
MD5 f4aced96d69343e605747904dccda692
BLAKE2b-256 a4f146ce8f0ddb27eaf3e82538bff0946da6e146b62c303f96a17e20bf77140c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for ManimPango-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d55e0f045e6cbd2ff9dce715ddec382661a49e80971961ed7b901cd37ac56df
MD5 6640403055324a69917c3cac964f1377
BLAKE2b-256 5c5a78dc94abdb9d4a954b4d94c3a7dd4d05dff4744e5e5211d607094c0dcd75

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ef3f275d7ef5a9cebc8795fb0fb1761839321909647fe8197914591998e85e3a
MD5 9ff6cbfb9e4aa9285a3e54e965db0227
BLAKE2b-256 5597d2c3c331111d8aa60f33b0c0612b3b3dac885147cc105828d1a1061f3e91

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 42ac4cb0aed37d2dcd98c6e9ca9982d89ac5a1fda66b81a8f048c8a75417a03b
MD5 45f1a8b0bbdb51cce0a28e6d04de2fec
BLAKE2b-256 834210988eccaaf16fcf816b8f9e39fc46c79f986a6757541c34f39440dfcae5

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.3.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for ManimPango-0.3.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a9e0316ec1745db60d66cb542b4b5e41a750c6ba8f7d1d83b80de787e6c42b68
MD5 381e45a0d30eda71ad92e9f4e59f5dbd
BLAKE2b-256 db070f4d9772cb6bab543960b216eb25c13b771c2b756cc9d16ab88816a3058e

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