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.2.6.tar.gz (455.9 kB view details)

Uploaded Source

Built Distributions

ManimPango-0.2.6-cp39-cp39-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

ManimPango-0.2.6-cp39-cp39-win32.whl (3.2 MB view details)

Uploaded CPython 3.9 Windows x86

ManimPango-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

ManimPango-0.2.6-cp38-cp38-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

ManimPango-0.2.6-cp38-cp38-win32.whl (3.2 MB view details)

Uploaded CPython 3.8 Windows x86

ManimPango-0.2.6-cp38-cp38-macosx_10_9_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

ManimPango-0.2.6-cp37-cp37m-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.7m Windows x86-64

ManimPango-0.2.6-cp37-cp37m-win32.whl (3.2 MB view details)

Uploaded CPython 3.7m Windows x86

ManimPango-0.2.6-cp37-cp37m-macosx_10_9_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

ManimPango-0.2.6-cp36-cp36m-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.6m Windows x86-64

ManimPango-0.2.6-cp36-cp36m-win32.whl (3.2 MB view details)

Uploaded CPython 3.6m Windows x86

ManimPango-0.2.6-cp36-cp36m-macosx_10_9_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: ManimPango-0.2.6.tar.gz
  • Upload date:
  • Size: 455.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for ManimPango-0.2.6.tar.gz
Algorithm Hash digest
SHA256 64028b62b151bc80b047cc1757b27943498416dc4a85f073892a524b4d90ab41
MD5 76e7f97e8b76c6aff54675dc18af30eb
BLAKE2b-256 32d83d4ac5747940bcc73798b49590b4e9ab3b91a17e594fcf0e0bfaf7c3da14

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 59a575fb28183fe68f3d8f5e93c98b7afa8e495eb0124ec09c660eef15adfcbb
MD5 e2ed85abcb312bdc694141bb2580e972
BLAKE2b-256 08e57a2c46fc1ca5544e5b5d9f43fd8c9ab25909aba86c10ed87679e4dd8bdba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp39-cp39-win32.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 de974e2435d445b1244a713b7b6ce4383bc6c574e0a1b59a6f33b8a16d1a147e
MD5 e50a76a30a4477bcaea3a654d645a2c8
BLAKE2b-256 ae9de2e7dffedf4c48beba99c4908a29541b174bd6c0f1b1bbdd4843c8a858a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for ManimPango-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2297b1c829cfff6d91f5d32a7a8e903e30d0b28be8006e9f61fd653981ce7827
MD5 292383a58d72a0b37bf152c4c1b99359
BLAKE2b-256 76c7ff6d45a341f265d57068c1ebf4be4efbe59612924c1809f01ee0b546b068

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e74690f948c5fe2cc5e13f22683c1875155fee4a4a75c4e24ce1dc6e4f9f9883
MD5 887245064f96419bf8776fe7ea7bd9b0
BLAKE2b-256 ced645e5546782d7346928dfa8253129e546a8cba9beae9527ea87d7eea42323

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp38-cp38-win32.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 28165fd23d8cfe7e260affa8d240d63bf66808f96154507ba534548b47834208
MD5 9ee3a4f62d2987772135300459fb7cfb
BLAKE2b-256 5a54bb27988b49533805020ca332c6eb243abb1e4cd0caa97f2922e08c474088

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for ManimPango-0.2.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 88bdd9c2714b94ee85da28002fd28122e4b26cb7ef74a48fe93d50cb06e8a35b
MD5 5f873bd0f67e08f7cb3d40205576ea9e
BLAKE2b-256 de080e7c1fd032203b27a53225ce08330b20ad325022461c1767d5b0bd93354a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 76d1ab6c131389e91cc84e0d3c4f746978cd301237ddd1e463f9463ff872d17f
MD5 d76531bcb23d8063607999e85bdb54d3
BLAKE2b-256 54a8a8c22fa4f65c63d79c968fbc8fb695b568f43fdcd74a0bf86fd886407874

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 b2062fac21e968930cb91945a8bfcf4593a3152f8bea5d6950c6aa304eb831a7
MD5 494d1fb5a8d15074782fee59dadf1152
BLAKE2b-256 230ac64b4f9b922bf8e32d9b4e012c46eb522af4de629e0874b833db4f448976

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.2.6-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for ManimPango-0.2.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e094d1f136f99408bb10bf4748ee6b51efba68e54e310096e75a8d38bb7ef111
MD5 defac9a011ad867f7f217450ac72da43
BLAKE2b-256 eeab4d7ca7ce97f56937db997f89cc07998151e61f2edfc05e822dfa4aedda37

See more details on using hashes here.

File details

Details for the file ManimPango-0.2.6-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: ManimPango-0.2.6-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 ed9cc957df9513d31b450acdb8f9bc76885ed5eae1a71d71e939c3133c14eb09
MD5 2296704615984d9fab908fd097bcb19d
BLAKE2b-256 dedb24efe2e157aa58be7ca81847d274aeaceb303289a000079d5604936e2d86

See more details on using hashes here.

File details

Details for the file ManimPango-0.2.6-cp36-cp36m-win32.whl.

File metadata

  • Download URL: ManimPango-0.2.6-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for ManimPango-0.2.6-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 05c1d1af85d2016819f4ce40758d0ef6564baa121238ef6a88240ad96220a7a8
MD5 0d16899900b7dc1297be4f560639618e
BLAKE2b-256 83eb0dea8792e551dea4a70e1195cb65aa8f3c579e93c59d37311ab0fd551229

See more details on using hashes here.

File details

Details for the file ManimPango-0.2.6-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ManimPango-0.2.6-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for ManimPango-0.2.6-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2a2d0ba8ca06e761650076a0e0050743acb2f1fb163f9b7db52decf95d91ced8
MD5 90b39e9f65b2bb488e575a35307fa259
BLAKE2b-256 d85322c9b919ebf06feb2d82713bbe739deb4871ce6114a4309e3e0ae7467e7e

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