manimpango 0.4.2__tar.gz → 0.4.4__tar.gz

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.
Files changed (51) hide show
  1. {ManimPango-0.4.2 → ManimPango-0.4.4}/ManimPango.egg-info/PKG-INFO +4 -3
  2. {ManimPango-0.4.2 → ManimPango-0.4.4}/ManimPango.egg-info/SOURCES.txt +1 -0
  3. {ManimPango-0.4.2 → ManimPango-0.4.4}/PKG-INFO +4 -3
  4. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/_version.py +1 -1
  5. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/register_font.pxd +10 -2
  6. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/register_font.pyx +4 -2
  7. ManimPango-0.4.4/requirements-dev.txt +5 -0
  8. {ManimPango-0.4.2 → ManimPango-0.4.4}/setup.py +3 -2
  9. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/test_markup.py +0 -1
  10. ManimPango-0.4.4/tests/test_valid_svg.py +16 -0
  11. ManimPango-0.4.2/requirements-dev.txt +0 -4
  12. {ManimPango-0.4.2 → ManimPango-0.4.4}/.coveragerc +0 -0
  13. {ManimPango-0.4.2 → ManimPango-0.4.4}/CODE_OF_CONDUCT.md +0 -0
  14. {ManimPango-0.4.2 → ManimPango-0.4.4}/LICENSE +0 -0
  15. {ManimPango-0.4.2 → ManimPango-0.4.4}/MANIFEST.in +0 -0
  16. {ManimPango-0.4.2 → ManimPango-0.4.4}/ManimPango.egg-info/dependency_links.txt +0 -0
  17. {ManimPango-0.4.2 → ManimPango-0.4.4}/ManimPango.egg-info/not-zip-safe +0 -0
  18. {ManimPango-0.4.2 → ManimPango-0.4.4}/ManimPango.egg-info/top_level.txt +0 -0
  19. {ManimPango-0.4.2 → ManimPango-0.4.4}/README.md +0 -0
  20. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/RELEASE.rst +0 -0
  21. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/_static/favicon.ico +0 -0
  22. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/_templates/autosummary/class.rst +0 -0
  23. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/_templates/autosummary/module.rst +0 -0
  24. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/conf.py +0 -0
  25. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/index.rst +0 -0
  26. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/make.bat +0 -0
  27. {ManimPango-0.4.2 → ManimPango-0.4.4}/docs/reference.rst +0 -0
  28. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/__init__.py +0 -0
  29. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/cairo.pxd +0 -0
  30. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/cmanimpango.pxd +0 -0
  31. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/cmanimpango.pyx +0 -0
  32. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/enums.pyx +0 -0
  33. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/glib.pxd +0 -0
  34. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/pango.pxd +0 -0
  35. {ManimPango-0.4.2 → ManimPango-0.4.4}/manimpango/utils.py +0 -0
  36. {ManimPango-0.4.2 → ManimPango-0.4.4}/pyproject.toml +0 -0
  37. {ManimPango-0.4.2 → ManimPango-0.4.4}/setup.cfg +0 -0
  38. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/__init__.py +0 -0
  39. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/_manim.py +0 -0
  40. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/conftest.py +0 -0
  41. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/fonts/AdobeVFPrototype.ttf +0 -0
  42. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/fonts/BungeeColor-Regular_colr_Windows.ttf +0 -0
  43. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/fonts/BungeeOutline-Regular.ttf +0 -0
  44. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/fonts/LICENSE.txt +0 -0
  45. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/fonts/MaShanZheng-Regular.ttf +0 -0
  46. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/svg_tester.py +0 -0
  47. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/test_colors.py +0 -0
  48. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/test_fonts.py +0 -0
  49. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/test_list_fonts.py +0 -0
  50. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/test_utils.py +0 -0
  51. {ManimPango-0.4.2 → ManimPango-0.4.4}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ManimPango
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Bindings for Pango for using with Manim.
5
5
  Home-page: https://manimpango.manim.community/
6
6
  Author: Naveen M K
@@ -197,14 +197,15 @@ Platform: Linux
197
197
  Platform: macOS
198
198
  Platform: Windows
199
199
  Classifier: Programming Language :: Python :: 3
200
- Classifier: Programming Language :: Python :: 3.7
201
200
  Classifier: Programming Language :: Python :: 3.8
202
201
  Classifier: Programming Language :: Python :: 3.9
203
202
  Classifier: Programming Language :: Python :: 3.10
203
+ Classifier: Programming Language :: Python :: 3.11
204
+ Classifier: Programming Language :: Python :: 3.12
204
205
  Classifier: Development Status :: 4 - Beta
205
206
  Classifier: Programming Language :: Python :: 3 :: Only
206
207
  Classifier: License :: OSI Approved :: MIT License
207
208
  Classifier: Operating System :: OS Independent
208
209
  Classifier: Programming Language :: Cython
209
- Requires-Python: >=3.7
210
+ Requires-Python: >=3.8
210
211
  Description-Content-Type: text/markdown
@@ -40,6 +40,7 @@ tests/test_fonts.py
40
40
  tests/test_list_fonts.py
41
41
  tests/test_markup.py
42
42
  tests/test_utils.py
43
+ tests/test_valid_svg.py
43
44
  tests/test_version.py
44
45
  tests/fonts/AdobeVFPrototype.ttf
45
46
  tests/fonts/BungeeColor-Regular_colr_Windows.ttf
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ManimPango
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Bindings for Pango for using with Manim.
5
5
  Home-page: https://manimpango.manim.community/
6
6
  Author: Naveen M K
@@ -197,14 +197,15 @@ Platform: Linux
197
197
  Platform: macOS
198
198
  Platform: Windows
199
199
  Classifier: Programming Language :: Python :: 3
200
- Classifier: Programming Language :: Python :: 3.7
201
200
  Classifier: Programming Language :: Python :: 3.8
202
201
  Classifier: Programming Language :: Python :: 3.9
203
202
  Classifier: Programming Language :: Python :: 3.10
203
+ Classifier: Programming Language :: Python :: 3.11
204
+ Classifier: Programming Language :: Python :: 3.12
204
205
  Classifier: Development Status :: 4 - Beta
205
206
  Classifier: Programming Language :: Python :: 3 :: Only
206
207
  Classifier: License :: OSI Approved :: MIT License
207
208
  Classifier: Operating System :: OS Independent
208
209
  Classifier: Programming Language :: Cython
209
- Requires-Python: >=3.7
210
+ Requires-Python: >=3.8
210
211
  Description-Content-Type: text/markdown
@@ -1,2 +1,2 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "0.4.2"
2
+ __version__ = "0.4.4"
@@ -1,4 +1,13 @@
1
1
 
2
+ from libc.stddef cimport wchar_t
3
+
4
+
5
+ cdef extern from "Python.h":
6
+ wchar_t* PyUnicode_AsWideCharString(
7
+ object unicode,
8
+ Py_ssize_t* size
9
+ )
10
+
2
11
  cdef extern from "fontconfig/fontconfig.h":
3
12
  ctypedef int FcBool
4
13
  ctypedef struct FcConfig:
@@ -13,8 +22,7 @@ cdef extern from "fontconfig/fontconfig.h":
13
22
  # Windows and macOS specific API's
14
23
  IF UNAME_SYSNAME == "Windows":
15
24
  cdef extern from "windows.h":
16
- ctypedef Py_UNICODE WCHAR
17
- ctypedef const WCHAR* LPCWSTR
25
+ ctypedef const wchar_t* LPCWSTR
18
26
  ctypedef enum DWORD:
19
27
  FR_PRIVATE
20
28
  int AddFontResourceExW(
@@ -97,8 +97,9 @@ ELIF UNAME_SYSNAME == "Windows":
97
97
  a=Path(font_path)
98
98
  assert a.exists(), f"font doesn't exist at {a.absolute()}"
99
99
  font_path = os.fspath(a.absolute())
100
+ cdef LPCWSTR wchar_path = PyUnicode_AsWideCharString(font_path, NULL)
100
101
  fontAddStatus = AddFontResourceExW(
101
- <bytes>font_path,
102
+ wchar_path,
102
103
  FR_PRIVATE,
103
104
  0
104
105
  )
@@ -129,8 +130,9 @@ ELIF UNAME_SYSNAME == "Windows":
129
130
  a=Path(font_path)
130
131
  assert a.exists(), f"font doesn't exist at {a.absolute()}"
131
132
  font_path = os.fspath(a.absolute())
133
+ cdef LPCWSTR wchar_path = PyUnicode_AsWideCharString(font_path, NULL)
132
134
  return RemoveFontResourceExW(
133
- <bytes>font_path,
135
+ wchar_path,
134
136
  FR_PRIVATE,
135
137
  0
136
138
  )
@@ -0,0 +1,5 @@
1
+ pytest-cov>=4.0,<5.0
2
+ pytest>=7.0.0,<8.0.0
3
+ Cython>=0.29.32,<0.30.0
4
+ coverage>=6.5.0,<7.0.0
5
+ setuptools>=59.2.0
@@ -261,16 +261,17 @@ setup(
261
261
  zip_safe=False,
262
262
  long_description_content_type="text/markdown",
263
263
  packages=["manimpango"],
264
- python_requires=">=3.7",
264
+ python_requires=">=3.8",
265
265
  platforms=["Linux", "macOS", "Windows"],
266
266
  keywords=["cython", "pango", "cairo", "manim"],
267
267
  license="MIT",
268
268
  classifiers=[
269
269
  "Programming Language :: Python :: 3",
270
- "Programming Language :: Python :: 3.7",
271
270
  "Programming Language :: Python :: 3.8",
272
271
  "Programming Language :: Python :: 3.9",
273
272
  "Programming Language :: Python :: 3.10",
273
+ "Programming Language :: Python :: 3.11",
274
+ "Programming Language :: Python :: 3.12",
274
275
  "Development Status :: 4 - Beta",
275
276
  "Programming Language :: Python :: 3 :: Only",
276
277
  "License :: OSI Approved :: MIT License",
@@ -24,7 +24,6 @@ ipsum_text = (
24
24
 
25
25
  @pytest.mark.parametrize("text", ["foo", "<b>bar</b>", "வணக்கம்"])
26
26
  def test_good_markup(text):
27
-
28
27
  assert not manimpango.MarkupUtils.validate(
29
28
  text,
30
29
  ), f"{text} should not fail validation"
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ from pathlib import Path
3
+ from xml.parsers.expat import ParserCreate
4
+
5
+ from ._manim import Text
6
+
7
+
8
+ def test_whether_valid_svg_file(tmpdir):
9
+ loc = Path(tmpdir, "test.svg")
10
+ assert not loc.exists()
11
+ Text("{ }", color="red", filename=str(loc))
12
+ assert loc.exists()
13
+ # verify that it's a valid svg file by parsing it
14
+ with open(loc, "rb") as f:
15
+ p = ParserCreate()
16
+ p.ParseFile(f)
@@ -1,4 +0,0 @@
1
- pytest-cov==2.12.0
2
- pytest==6.2.4
3
- Cython==0.29.32
4
- coverage==5.5
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes