ManimPango 0.6.1__cp311-cp311-macosx_10_13_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- manimpango/__init__.py +35 -0
- manimpango/_register_font.cpython-311-darwin.so +0 -0
- manimpango/_register_font.pxd +71 -0
- manimpango/_register_font.pyx +160 -0
- manimpango/_version.py +2 -0
- manimpango/cairo.pxd +27 -0
- manimpango/cmanimpango.cpython-311-darwin.so +0 -0
- manimpango/cmanimpango.pxd +3 -0
- manimpango/cmanimpango.pyx +321 -0
- manimpango/enums.cpython-311-darwin.so +0 -0
- manimpango/enums.pyx +113 -0
- manimpango/glib.pxd +13 -0
- manimpango/pango.pxd +193 -0
- manimpango/register_font.py +156 -0
- manimpango/utils.py +49 -0
- manimpango-0.6.1.dist-info/METADATA +219 -0
- manimpango-0.6.1.dist-info/RECORD +21 -0
- manimpango-0.6.1.dist-info/WHEEL +6 -0
- manimpango-0.6.1.dist-info/licenses/LICENSE +21 -0
- manimpango-0.6.1.dist-info/licenses/LICENSE.bin +3208 -0
- manimpango-0.6.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ManimPango
|
|
3
|
+
Version: 0.6.1
|
|
4
|
+
Summary: Bindings for Pango for using with Manim.
|
|
5
|
+
Home-page: https://manimpango.manim.community/
|
|
6
|
+
Author: Naveen M K
|
|
7
|
+
Author-email: naveen@manim.community
|
|
8
|
+
Maintainer: The Manim Community Developers
|
|
9
|
+
License: MIT
|
|
10
|
+
Project-URL: Documentation, https://manimpango.manim.community/
|
|
11
|
+
Project-URL: Source, https://github.com/ManimCommunity/manimpango
|
|
12
|
+
Project-URL: Release notes, https://github.com/ManimCommunity/ManimPango/releases/
|
|
13
|
+
Keywords: cython,pango,cairo,manim
|
|
14
|
+
Platform: Linux
|
|
15
|
+
Platform: macOS
|
|
16
|
+
Platform: Windows
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Development Status :: 4 - Beta
|
|
25
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
26
|
+
Classifier: Programming Language :: Cython
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
License-File: LICENSE.bin
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: author-email
|
|
33
|
+
Dynamic: classifier
|
|
34
|
+
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: keywords
|
|
38
|
+
Dynamic: license
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
Dynamic: maintainer
|
|
41
|
+
Dynamic: platform
|
|
42
|
+
Dynamic: project-url
|
|
43
|
+
Dynamic: requires-python
|
|
44
|
+
Dynamic: summary
|
|
45
|
+
|
|
46
|
+
# ManimPango
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="https://pypi.org/project/manimpango/"><img src="https://img.shields.io/pypi/v/manimpango.svg?style=flat&logo=pypi" alt="PyPI Latest Release"></a>
|
|
50
|
+
<a href="https://pypi.org/project/manimpango/"><img alt="PyPI - Wheel" src="https://img.shields.io/pypi/wheel/manimpango"></a>
|
|
51
|
+
<a href="https://pypi.org/project/manimpango/"><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/manimpango"></a>
|
|
52
|
+
<a href="https://choosealicense.com/licenses/mit/"><img alt="PyPI - License" src="https://img.shields.io/pypi/l/manimpango"></a>
|
|
53
|
+
<a href="https://pypi.org/project/manimpango/"><img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/ManimPango.svg?style=flat"></a>
|
|
54
|
+
<a href='https://manimpango.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/manimpango/badge/?version=latest' alt='Documentation Status' /></a>
|
|
55
|
+
<br>
|
|
56
|
+
<img src="https://github.com/ManimCommunity/manimpango/workflows/Build%20Wheels/badge.svg">
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
**ManimPango** is a C binding for [Pango](https://pango.gnome.org/) using [Cython](https://cython.org/), which is internally used in [Manim](https://www.manim.community) to render (non-LaTeX) text.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## INSTALL
|
|
64
|
+
|
|
65
|
+
Installing **ManimPango** is super easy, just use `pip`. It is [`manimpango`](https://pypi.org/project/manimpango/) in PyPi.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
pip install manimpango
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
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](#BUILDING) for more information.
|
|
72
|
+
|
|
73
|
+
## WORKFLOW SETUP / CONTRIBUTING
|
|
74
|
+
|
|
75
|
+
To make it easier for developers to contribute, we have a pre-commit workflow that will check for `black` formatting and `flake` checking.
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
pip install pre-commit
|
|
79
|
+
pre-commit install
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## BUILDING
|
|
83
|
+
|
|
84
|
+
### Linux/MacOS
|
|
85
|
+
|
|
86
|
+
For building **ManimPango**, you need
|
|
87
|
+
* a C compiler
|
|
88
|
+
* Python's development headers
|
|
89
|
+
* [`pkg-config`](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
|
90
|
+
* [Pango](https://pango.gnome.org) along with its development headers and its dependencies.
|
|
91
|
+
|
|
92
|
+
If you are on MacOS, you can use [brew](https://brew.sh) to install those. Using [MacPorts](https://www.macports.org) is also possible.
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
brew install pango pkg-config
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
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`
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
apt install libpango1.0-dev pkg-config python3-dev
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Arch Linux:** `pacman -S pango pkgconf`
|
|
105
|
+
|
|
106
|
+
**Fedora:** `dnf install pango-devel pkg-config python3-devel`
|
|
107
|
+
|
|
108
|
+
Or similar in your system's package manager.
|
|
109
|
+
|
|
110
|
+
#### Using `tar` archives
|
|
111
|
+
|
|
112
|
+
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
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
pip install manimpango --no-binary :all:
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Note**: `pip` by default uses wheels, so make sure to pass the `--no-binary` parameter.
|
|
119
|
+
|
|
120
|
+
#### Using `git` clones / Contributing
|
|
121
|
+
|
|
122
|
+
Please remember to do this inside your virtual environment, if you want to use your **Manimpango** with **Manim**.
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
python -m venv ./venv
|
|
126
|
+
source venv/bin/activate # Linux/macOS
|
|
127
|
+
venv\Scripts\activate # Windows
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
If you are using a clone of this repository, you will need [Cython](https://cython.org) which can be easily installed using `pip`:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
pip install Cython
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
After that you can use `pip` to install the clone with the following command:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
pip install -e .
|
|
140
|
+
pip install -r requirements-dev.txt .
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Next, run the setup script:
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
python setup.py build_ext -i
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
After installation is complete, you should be able to run pytest:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
pytest
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
You will need to this way if you want to *contribute* to **ManimPango**.
|
|
156
|
+
|
|
157
|
+
### Contributing with Windows
|
|
158
|
+
|
|
159
|
+
*If you are a normal user, don't read this, you have wheels which you can just install directly using pip.*
|
|
160
|
+
|
|
161
|
+
If you want to contribute to **ManimPango** and you are on Windows, this section is for you.
|
|
162
|
+
|
|
163
|
+
As Windows does not include a C compiler by default, you will first need to install one. You have two choices:
|
|
164
|
+
|
|
165
|
+
1. MinGW/Msys2
|
|
166
|
+
|
|
167
|
+
2. Visual Studio
|
|
168
|
+
|
|
169
|
+
#### MinGW/Msys2
|
|
170
|
+
|
|
171
|
+
1. Download **MSYS2** from the download link provided on their page https://www.msys2.org/#installation and install it according to their instructions.
|
|
172
|
+
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.
|
|
173
|
+
3. Run the following commands to install Python, Pango, Cython, Numpy, Scipy, Pillow, Pycairo and ffmpeg
|
|
174
|
+
```sh
|
|
175
|
+
pacman -S mingw-w64-x86_64-python
|
|
176
|
+
pacman -S mingw-w64-x86_64-python-pip
|
|
177
|
+
pacman -S mingw-w64-x86_64-pango
|
|
178
|
+
pacman -S mingw-w64-x86_64-cython
|
|
179
|
+
pacman -S mingw-w64-x86_64-python-numpy
|
|
180
|
+
pacman -S mingw-w64-x86_64-python-scipy
|
|
181
|
+
pacman -S mingw-w64-x86_64-python-pillow
|
|
182
|
+
pacman -S mingw-w64-x86_64-python-cairo
|
|
183
|
+
pacman -S mingw-w64-x86_64-ffmpeg
|
|
184
|
+
```
|
|
185
|
+
4. Still in the same shell, install **Manim** using `pip install manim`.
|
|
186
|
+
5. Finally, get your clone of **ManimPango**, `cd` into that directory and then run `pip install -e .`.
|
|
187
|
+
**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`.
|
|
188
|
+
6. You can then use `manim` inside that shell, to run **Manim**.
|
|
189
|
+
**Hint**: If you want to try out Python interactively, you can open `idle` using the command `python -m idlelib` inside that shell.
|
|
190
|
+
|
|
191
|
+
#### Visual Studio
|
|
192
|
+
|
|
193
|
+
First, install Visual Studio as specified in https://wiki.python.org/moin/WindowsCompilers. Possibly Visual Studio Build Tools 2022 with Windows10 SDK.
|
|
194
|
+
|
|
195
|
+
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` to PATH.
|
|
196
|
+
|
|
197
|
+
**Note:** You can change the install location by editing line 24 of the file `packing/download_dlls.py`.
|
|
198
|
+
|
|
199
|
+
Then set an environment variable `PKG_CONFIG_PATH`=`C:\cibw\vendor\lib\pkgconfig`.
|
|
200
|
+
|
|
201
|
+
Then you can install Cython using
|
|
202
|
+
|
|
203
|
+
```sh
|
|
204
|
+
pip install Cython
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Finally, you can install your local **ManimPango** clone just like any other python package by typing:
|
|
208
|
+
|
|
209
|
+
```sh
|
|
210
|
+
pip install .
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Code of Conduct
|
|
214
|
+
|
|
215
|
+
Our full code of conduct, and how we enforce it, can be read on [our website](https://docs.manim.community/en/latest/conduct.html).
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
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.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
manimpango-0.6.1.dist-info/RECORD,,
|
|
2
|
+
manimpango-0.6.1.dist-info/WHEEL,sha256=yoGyruR5luWhmkaGvb6F6SKVgx5My2KED1c4tyM2fXM,138
|
|
3
|
+
manimpango-0.6.1.dist-info/top_level.txt,sha256=_7RXNU2cbck8IbstWHzYv6YV58wtKUDBX-pmUjE6SKs,11
|
|
4
|
+
manimpango-0.6.1.dist-info/METADATA,sha256=eWIwZM-0cCNlGtYjrlNjL-1f78qC1Vf27urD5ueKh6s,8195
|
|
5
|
+
manimpango-0.6.1.dist-info/licenses/LICENSE,sha256=PkzdSXTMd8X-B3IFjUlsGc9eDGAM9x7DAt8iBgLj7sg,1067
|
|
6
|
+
manimpango-0.6.1.dist-info/licenses/LICENSE.bin,sha256=qM2kte-MyVxokaHNRdgyYS0aH1yP2uLXfOwzqkLPtlA,160378
|
|
7
|
+
manimpango/cmanimpango.cpython-311-darwin.so,sha256=K3vynmEs_-sSZFCYxJ9yihY-xlD_ux5Orw9GP9ZV9xc,7489744
|
|
8
|
+
manimpango/cmanimpango.pxd,sha256=qmQydFpNgEPYcDtfDhcaiAhu6-WyvQA0Tth09fO0sl4,62
|
|
9
|
+
manimpango/_version.py,sha256=i9G4B6HUGLv8rKu2WhfxePgE-H6n4q70wos4-7QZR2M,46
|
|
10
|
+
manimpango/_register_font.pxd,sha256=0xKRYafsvYhOT2LdNuh9XfvfNQRYs4XDTCgYJTLFZ8E,2028
|
|
11
|
+
manimpango/__init__.py,sha256=ga7wc-Qp5exvu1OJqt3VhySoWUpqUIWsZCE_Fh3-_jc,1097
|
|
12
|
+
manimpango/cairo.pxd,sha256=qI50gJGUuAJy9A6hRZbMMwMWqfCmG5H6Tz-EWkqmvTo,771
|
|
13
|
+
manimpango/enums.pyx,sha256=ltZjDhviuWzi8pRDDkbRp3rYiZIassSpezOEOx0x3xw,2461
|
|
14
|
+
manimpango/register_font.py,sha256=KMZwJlZK1liXFWl4TslOnV-2_8A_AViecQXjMdpX5UQ,3951
|
|
15
|
+
manimpango/enums.cpython-311-darwin.so,sha256=JWkpBtm7OKF2TzTd9npTBupzVW-wXLvGYq0LFnmXUt8,4203008
|
|
16
|
+
manimpango/utils.py,sha256=khEmMGksIdblHNbM-Rlv4r3Cj2QmP0Jf3Eb6xP1imnc,1621
|
|
17
|
+
manimpango/pango.pxd,sha256=yKu5nJUj_WP--KXshX_5i868Bc8NmdbYWoAWjaEPNBg,5344
|
|
18
|
+
manimpango/_register_font.pyx,sha256=gQGvAVMMwdEqEsz148lLzODsX-E5VRPzjObwpmpYqTM,5135
|
|
19
|
+
manimpango/_register_font.cpython-311-darwin.so,sha256=Y6EpGX3JHbCH0R9pes05djqxnpMv-RmXWDmYuCQkQ_c,7284264
|
|
20
|
+
manimpango/cmanimpango.pyx,sha256=7X4q6SZGg7WpDGR23THbqqNQaPoYBxejQuG7M6fMxgk,11046
|
|
21
|
+
manimpango/glib.pxd,sha256=-Ua7DTGh1FCHZc7fnOUGuCsYfl5WlW7LFpGXAq6VUNM,374
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Naveen M K
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|