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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 Windows x86

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

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for ManimPango-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2e40eb7ae7ad500961113a0a0e3f61ac462e693db28112a8c96f4f17022bb62c
MD5 c322439c7d24ee06dd859ab42c869404
BLAKE2b-256 73e73f8c94bff2c44747292f26e6a666a1728b0d3c7b48de978c237b063607ae

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8d34a91d14b159226d04cc641c6e71959af80678a9ae540253928b13ec161b00
MD5 34fe072ccd28046cdf6288ddef179b79
BLAKE2b-256 9289601c736fdd070b2605828ecdc36a36642676f00b996da3839996226f917e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 4afa508dfbe7f9b9023b64b90e1f96520c6c07670429d808f4b835f18231c4bf
MD5 68aa262d46ba8ddba8dbd5dc938316f1
BLAKE2b-256 f428a0960ad32228446c67d757d189a1a974588b648e08f3c2cd437b0456840f

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for ManimPango-0.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 770e94cff0ca6cc8dfa0154ced85216ebaffcfbe95f37e1113d0a01f9f3da496
MD5 30591caa313b9c64c4cce9377f8c7c3a
BLAKE2b-256 d10d678995e7824c25e3a1ac94d7290cda223deabcf7b814be45d015ff249765

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e53f008020568004ab70316cd6eb32183255c7b5079c6a9a5204971a0a573741
MD5 213eccbbb8e00c17793a16777ac63454
BLAKE2b-256 b98b5be2dab497cd25b328fc57ea67745835285bb2aafb2c380c90a57c59f14d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 2e726ccd6b4cf6f4d9d4750f1dbf06e8ecae717404b37eb446cffe1ebf4f41ba
MD5 65cd67231d9c11da55b6ba8f5a7fe646
BLAKE2b-256 27d1afbe1115e2347cbfa633ca69975dc981a8fe55f3a6845c7bfeb466784e20

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for ManimPango-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 11b7837b93155441a20305a522def743a789fd551e21d0da7a6328308362c323
MD5 5395361036dde7b528af404a1476ae7a
BLAKE2b-256 8be60b2e267e27c9f01a5a5c0b70990ebb3b91953b270278cfb060c766b17d04

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2914fcce42d794dcd6fbc83b18b8ca2341f5e844111bd831dfe2f3d5312fd1a5
MD5 2a9dff19b74507f9268830e8e61a461c
BLAKE2b-256 0a57d348111309e4b43b8ce874b6ee61729f9f8a2f952bd5893a2812062ef0b3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 2df2b43004f2d25f96f3778c4ba304d05158a81a0b22272e83d14fa61f6864ec
MD5 1c47a120b5b8ed7fdbb2d1475df66945
BLAKE2b-256 3c9350948383011ae46e80ab582a17075aba29e73114b585fd6a0f72cf06facd

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for ManimPango-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e624becbcdab6be126f7617cff8010fd3674c7ea01887b466506d8becc7a743f
MD5 cff45dc6a5b84d2de5b74d27c6740b43
BLAKE2b-256 3fa601e46493c7ef84d928ffb6bbcc89778355639a82d61698de976797b4e759

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 764dc0d8fc31b0f432a6a1c04ea3842801ca06f5f76217ae519a23a9d1a5efc4
MD5 64a3de58abc09faa9b097a224f01dc0b
BLAKE2b-256 8d8783d5d9030e2b7ec32f24c27a01dba9846e861a09d3a65758b22ee6a2e05b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ManimPango-0.4.0-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.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for ManimPango-0.4.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 5f577789e330c70fb2ed3c9554dbbaa0c54a7bf3d9963e2fe0bfe56681a8aae0
MD5 cd882c733aa5670c413ef32f8d5d139c
BLAKE2b-256 f4218fc54fc1873c43549910db4463e3c148ccc0ab549ea06a447e232aa5866d

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for ManimPango-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 037e9af1407c630d59423808ff018710ccdbaf9b81b800b176344129b603f9a9
MD5 5c049691f3d13ed92e2cdb54e72434c6
BLAKE2b-256 bc0f894bcd83ff722babbe39951fcd60590e2ba464b57aad0b569214183bff80

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