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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 Windows x86

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

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

ManimPango-0.4.0.post2-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.4.0.post2.tar.gz.

File metadata

  • Download URL: ManimPango-0.4.0.post2.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.post2.tar.gz
Algorithm Hash digest
SHA256 1a8b1b2981bdb128f43defc702bf457b7fd1c8dbb5b0c0625421623716394b25
MD5 c74cf9c0b4b9ec627c914b8d0202bf59
BLAKE2b-256 20cf286d5f18f35e7c4b21879afba3757467ff9d82004bfd1ddba9f38df949ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7cf92ce09d9154d0c078014882ca5d45eeace6c730ca1bde73f2aa505d9247b3
MD5 4a97224a4a26bfd4168450dc60301086
BLAKE2b-256 3aea633ec9fa74df861f48752aa8af89c8ed39aaa55e79618e6513e348279298

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9e8e881ac9d10bebb606ba490f0767755076996621b4e5ef2eb68313460d6853
MD5 af0cc5e577f24af68303905c15937937
BLAKE2b-256 445c008fcfd4c2de302fd266d82c953893fe59b0feb01e7495b3930cd94ee39e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.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.post2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cebd954283da3ed36803bcca47ef49ed6f7587deddecd0a76e4ba6a947c22f25
MD5 bd748a99570b8a26f505f45a00dfe483
BLAKE2b-256 4d646ef027f94a79e18d08076149280063a4e8c1132fc4b10f492b86bfe9a809

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 db497fd2ac84232adf8d2773110a7f2dd53ebabb5c4a434d01cc3f075af96c21
MD5 e9e232eac48e8b49dc4db4cdb77a66e0
BLAKE2b-256 80ca2be143f2f4fba1fc30ce381aaf017d6e88c132e8b047dd9faa9cc2868d11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 717dbab9b5030a60e141490e3286f8e92519a8aaffa402f7851cd2b657cccdc5
MD5 7a251fc7735b63b187e399d370d6c6bb
BLAKE2b-256 dd68a50310b62c85594816adcc0ac90aa3bc9e2e6f121289f39fff2bbd4362d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.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.post2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6cf01df4fbdd7619e854a5455698638ff3f33df0bb461506f2508682fe005848
MD5 018eb173323ba2694ba226374a1eacbc
BLAKE2b-256 b8990624131820b25dc6d0cf19187e969bca513794e65d045da32384952acdaa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a05e3764bd2c5cf2b1d2a35804eeec0efb5be98a835574f10ebdd1651bb42ec2
MD5 a24d2f32601dd8ed2b13c56a982edf69
BLAKE2b-256 9cd5717d8e22adc6ad184046473d64ee5d747e267c476f00bbe61a299fe47f2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 cb02f1189e35a5d2b03d32b4e0b995afa326071dbbebb69ffd76d4cddb33d6a3
MD5 9d295b64fd4eccd6c642a4bf9472e36e
BLAKE2b-256 d3078a5f6ccaed09f8dd69b7b30710fad0710d525bd17eac1cde113290206de8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.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.post2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9cf0cc4bca4d5fb5bc9c50356402a55a6d03d4cbfb83f07e36162010c2e5c836
MD5 f416bb5139120035a3cf01fb1a75fca4
BLAKE2b-256 ef0c0ef6020f016ec5c86f8d9b5f59b63e3a3295675f1a44283ba4c3dca3314f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2fa3591677d8eaf793e1b39904f8647c11776aeb669dbfee8ddda90061c53a90
MD5 474bd45920d6d30c516531dc31bcb6b8
BLAKE2b-256 7cd5d8c53e06435d1b6f3de438db8e790f723083fe56cf12a3941cf44a42e8d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.post2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 8bdeafae9c112e91a29a107c3472ec7e00a2d536055a6446c804063eb0e2710c
MD5 bd226369526ce6846753a642a81e4363
BLAKE2b-256 401c38405ca5469984c5f9837b371fb3959a3c1626e0b3a32125f38528216b2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ManimPango-0.4.0.post2-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.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.post2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 916b01f3dd846243bcb42ae4443475fad04d8ef42ced22134c59ff613b5802fe
MD5 eeed94a4c3a68d586348a099ede1c89d
BLAKE2b-256 ddd5aaa4956a61fbd4d5c96fc64502d936829b283dcad58d4ede4830c6860c20

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