diff --git a/pythonforandroid/recipes/freetype-py/__init__.py b/pythonforandroid/recipes/freetype-py/__init__.py new file mode 100644 index 0000000000..7be2f2e10c --- /dev/null +++ b/pythonforandroid/recipes/freetype-py/__init__.py @@ -0,0 +1,12 @@ +from pythonforandroid.recipe import PythonRecipe + + +class FreetypePyRecipe(PythonRecipe): + version = '2.2.0' + url = 'https://github.com/rougier/freetype-py/archive/refs/tags/v{version}.tar.gz' + depends = ['freetype'] + patches = ['fall-back-to-distutils.patch'] + site_packages_name = 'freetype' + + +recipe = FreetypePyRecipe() diff --git a/pythonforandroid/recipes/freetype-py/fall-back-to-distutils.patch b/pythonforandroid/recipes/freetype-py/fall-back-to-distutils.patch new file mode 100644 index 0000000000..0f06f1854a --- /dev/null +++ b/pythonforandroid/recipes/freetype-py/fall-back-to-distutils.patch @@ -0,0 +1,15 @@ +diff -ruN freetype-py.orig/setup.py freetype-py/setup.py +--- freetype-py.orig/setup.py 2020-07-09 20:58:51.000000000 +0700 ++++ freetype-py/setup.py 2022-03-02 19:28:17.948831134 +0700 +@@ -12,7 +12,10 @@ + from io import open + from os import path + +-from setuptools import setup ++try: ++ from setuptools import setup ++except ImportError: ++ from distutils.core import setup + + if os.environ.get("FREETYPEPY_BUNDLE_FT"): + print("# Will build and bundle FreeType.")