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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m macOS 10.9+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

ManimPango-0.3.0-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.3.0.tar.gz.

File metadata

  • Download URL: ManimPango-0.3.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for ManimPango-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5c3b6f89e043fbb5e467131fb346801496e1d8e92803362d0a47a0761c5c55c8
MD5 747ee7208b563e8efcc9afc7ce5914b6
BLAKE2b-256 f4ad0cc179bc96cfbbdb71ef9047345d56ad0115a0958a9b45fd8fbc9c33a2cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e13596d47ae6a44788d4ca159c2b767891fdc81fa5cf7448cec8fad61a67d2aa
MD5 fd5f083fdc4bbea0cda251cc8ae5ee7f
BLAKE2b-256 9d43d4e0a2e48c5c6e485fcb764db0adf476bf72f9e1634603ebbb16674ace65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 00c2cd26b1e4043f24251ec6142f9dc887fd88cbda386c3e6abec86be3b985cd
MD5 6ef7744a9636e9173e8f45cb60fb807b
BLAKE2b-256 ce6c05ad4e510e18670ffaa97cfd4e7387481e32a9689b825bd0479a07c4268a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.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.3.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4db360377e620333c0be92e66c547ada1e4467f6bcc34956c4222cba9206a70b
MD5 4cc2e8ccf5624a9800f5463fb05f5ff5
BLAKE2b-256 3fcede19b4eeb0a7f9cf38f84418b33872247db9024b3ba956bed6b6a6350791

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cdb9eb2a4201e097e8415f14a951d99fd289b4bc7f8922e17fc243901bfc4943
MD5 fec4be34a9315fc0112a4f0d6126f317
BLAKE2b-256 6aabbc26bf5b333ccbca42eefbd6b3e242dd77b463e4760f4089326e6fbc1da4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 e0dab9cd8f2902d12ced5fbaa2b465d3e8451841dcc3e416ce1857fc11fb6af1
MD5 0d09fd8f8845e7ede62149b64400367e
BLAKE2b-256 272c403ecf60784b87e502f83499b00e4d14228482831bd62f3e98693b2f1c49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.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.3.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 20ec8a0ee6b9219f8628cb7d38cd2e0b2efa09e06f7674f860ea54871ca74bcd
MD5 a58fcfd980901cf54fc85a90d870bb03
BLAKE2b-256 ce848864874d730650d0527115c9edcb409aee9cc825b2f3dbcbf1c443752710

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3e93a59fbd5a1ca3bf11fe9da5b322633a25a21ddd232a3f295848ca2e8be50b
MD5 cb078f7990ce992631bedd209f22cee2
BLAKE2b-256 4aef7564f81728fb410e0925ed50d13ad23a8dd48435e0adaa201ab20c6eaac7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 9e6261d433d217efb7c2b265cb442a7989fb65ed87c1ad0034675a209aa3b6ae
MD5 301a4116465f93cdb0f6e59546867397
BLAKE2b-256 2b68978890ddd011b79cb1bd20726f423103531cee1b7e5ee69ac5692ef55a8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.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.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e32e0d009f39c38d05627d32aa6424ba3aab1c98dde862d653bc28b1658e8520
MD5 526e79e7be8b1f9c1862af8ed96da31f
BLAKE2b-256 5181f06b3a922f1f325d2d29a6b526567900b60f69f70cacfc9c7d8a517a8d3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d0296ad164a314fe25fcf5dd9a4451e9766cd8030a896d41aa0bf4c06f41e17b
MD5 13660687fcf97f89f48432440338e65b
BLAKE2b-256 70b44ccc5b155756d5da8f3ce398f21d1b5899aed0a5ed37627b74b3463e91fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.1 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.3.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 3331f0f03c566ab1790594be3931b4b28b99fa49bc7d3267e6d3a59196af739c
MD5 dc3f0295cdf3c10017c97ca4724f156f
BLAKE2b-256 2bf10ceb9d803e02a31b79483b4b609756939f9c1824dc2c8976fe958b843fa2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.3.0-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/4.0.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.3.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2040939c9e2361118f04a824472ab4f6b5d1525b32967ecb78c4fece435f0b28
MD5 79962d07c6b3b5357f2218f0cad4affc
BLAKE2b-256 9a93356c053ebe9a626756c9ae6441305288143653b66a907fc0315cc8aebb16

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