From 51287006e02dfb8e6a010eabcc3045d3f09b42cc Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Sun, 14 Sep 2025 17:09:59 +0530 Subject: [PATCH 1/2] Update --- pythonforandroid/recipes/sympy/__init__.py | 16 +- .../recipes/sympy/fix_android_detection.patch | 47 ---- .../recipes/sympy/fix_pretty_print.patch | 223 ------------------ .../recipes/sympy/fix_timeutils.patch | 13 - 4 files changed, 7 insertions(+), 292 deletions(-) delete mode 100644 pythonforandroid/recipes/sympy/fix_android_detection.patch delete mode 100644 pythonforandroid/recipes/sympy/fix_pretty_print.patch delete mode 100644 pythonforandroid/recipes/sympy/fix_timeutils.patch diff --git a/pythonforandroid/recipes/sympy/__init__.py b/pythonforandroid/recipes/sympy/__init__.py index 8684a95e06..5420bf0379 100644 --- a/pythonforandroid/recipes/sympy/__init__.py +++ b/pythonforandroid/recipes/sympy/__init__.py @@ -1,16 +1,14 @@ +from pythonforandroid.recipe import PyProjectRecipe -from pythonforandroid.recipe import PythonRecipe +class SympyRecipe(PyProjectRecipe): -class SympyRecipe(PythonRecipe): - version = '1.1.1' - url = 'https://github.com/sympy/sympy/releases/download/sympy-{version}/sympy-{version}.tar.gz' - + version = '1.14.0' + url = 'https://github.com/sympy/sympy/archive/refs/tags/{version}.zip' depends = ['mpmath'] - - call_hostpython_via_targetpython = True - - patches = ['fix_timeutils.patch', 'fix_pretty_print.patch'] + hostpython_prerequisites = ['setuptools', 'build'] + call_hostpython_via_targetpython = False + install_in_hostpython = True recipe = SympyRecipe() diff --git a/pythonforandroid/recipes/sympy/fix_android_detection.patch b/pythonforandroid/recipes/sympy/fix_android_detection.patch deleted file mode 100644 index 964c3db66f..0000000000 --- a/pythonforandroid/recipes/sympy/fix_android_detection.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/pip/download.py b/pip/download.py -index 54d3131..1aab70f 100644 ---- a/pip/download.py -+++ b/pip/download.py -@@ -89,23 +89,25 @@ def user_agent(): - # Complete Guess - data["implementation"]["version"] = platform.python_version() - -- if sys.platform.startswith("linux"): -- from pip._vendor import distro -- distro_infos = dict(filter( -- lambda x: x[1], -- zip(["name", "version", "id"], distro.linux_distribution()), -- )) -- libc = dict(filter( -- lambda x: x[1], -- zip(["lib", "version"], libc_ver()), -- )) -- if libc: -- distro_infos["libc"] = libc -- if distro_infos: -- data["distro"] = distro_infos -- -- if sys.platform.startswith("darwin") and platform.mac_ver()[0]: -- data["distro"] = {"name": "macOS", "version": platform.mac_ver()[0]} -+ # if sys.platform.startswith("linux"): -+ # from pip._vendor import distro -+ # distro_infos = dict(filter( -+ # lambda x: x[1], -+ # zip(["name", "version", "id"], distro.linux_distribution()), -+ # )) -+ # libc = dict(filter( -+ # lambda x: x[1], -+ # zip(["lib", "version"], libc_ver()), -+ # )) -+ # if libc: -+ # distro_infos["libc"] = libc -+ # if distro_infos: -+ # data["distro"] = distro_infos -+ -+ # if sys.platform.startswith("darwin") and platform.mac_ver()[0]: -+ # data["distro"] = {"name": "macOS", "version": platform.mac_ver()[0]} -+ -+ data['distro'] = {'name': 'Android'} - - if platform.system(): - data.setdefault("system", {})["name"] = platform.system() diff --git a/pythonforandroid/recipes/sympy/fix_pretty_print.patch b/pythonforandroid/recipes/sympy/fix_pretty_print.patch deleted file mode 100644 index f94cb2245c..0000000000 --- a/pythonforandroid/recipes/sympy/fix_pretty_print.patch +++ /dev/null @@ -1,223 +0,0 @@ -diff --git a/sympy/printing/pretty/pretty.py b/sympy/printing/pretty/pretty.py -index 604e97c..ddd3eb2 100644 ---- a/sympy/printing/pretty/pretty.py -+++ b/sympy/printing/pretty/pretty.py -@@ -166,14 +166,14 @@ class PrettyPrinter(Printer): - arg = e.args[0] - pform = self._print(arg) - if isinstance(arg, Equivalent): -- return self._print_Equivalent(arg, altchar=u"\N{NOT IDENTICAL TO}") -+ return self._print_Equivalent(arg, altchar=u"NOT IDENTICAL TO") - if isinstance(arg, Implies): -- return self._print_Implies(arg, altchar=u"\N{RIGHTWARDS ARROW WITH STROKE}") -+ return self._print_Implies(arg, altchar=u"RIGHTWARDS ARROW WITH STROKE") - - if arg.is_Boolean and not arg.is_Not: - pform = prettyForm(*pform.parens()) - -- return prettyForm(*pform.left(u"\N{NOT SIGN}")) -+ return prettyForm(*pform.left(u"NOT SIGN")) - else: - return self._print_Function(e) - -@@ -200,43 +200,43 @@ class PrettyPrinter(Printer): - - def _print_And(self, e): - if self._use_unicode: -- return self.__print_Boolean(e, u"\N{LOGICAL AND}") -+ return self.__print_Boolean(e, u"LOGICAL AND") - else: - return self._print_Function(e, sort=True) - - def _print_Or(self, e): - if self._use_unicode: -- return self.__print_Boolean(e, u"\N{LOGICAL OR}") -+ return self.__print_Boolean(e, u"LOGICAL OR") - else: - return self._print_Function(e, sort=True) - - def _print_Xor(self, e): - if self._use_unicode: -- return self.__print_Boolean(e, u"\N{XOR}") -+ return self.__print_Boolean(e, u"XOR") - else: - return self._print_Function(e, sort=True) - - def _print_Nand(self, e): - if self._use_unicode: -- return self.__print_Boolean(e, u"\N{NAND}") -+ return self.__print_Boolean(e, u"NAND") - else: - return self._print_Function(e, sort=True) - - def _print_Nor(self, e): - if self._use_unicode: -- return self.__print_Boolean(e, u"\N{NOR}") -+ return self.__print_Boolean(e, u"NOR") - else: - return self._print_Function(e, sort=True) - - def _print_Implies(self, e, altchar=None): - if self._use_unicode: -- return self.__print_Boolean(e, altchar or u"\N{RIGHTWARDS ARROW}", sort=False) -+ return self.__print_Boolean(e, altchar or u"RIGHTWARDS ARROW", sort=False) - else: - return self._print_Function(e) - - def _print_Equivalent(self, e, altchar=None): - if self._use_unicode: -- return self.__print_Boolean(e, altchar or u"\N{IDENTICAL TO}") -+ return self.__print_Boolean(e, altchar or u"IDENTICAL TO") - else: - return self._print_Function(e, sort=True) - -@@ -425,7 +425,7 @@ class PrettyPrinter(Printer): - if self._use_unicode: - # use unicode corners - horizontal_chr = xobj('-', 1) -- corner_chr = u'\N{BOX DRAWINGS LIGHT DOWN AND HORIZONTAL}' -+ corner_chr = u'BOX DRAWINGS LIGHT DOWN AND HORIZONTAL' - - func_height = pretty_func.height() - -@@ -580,7 +580,7 @@ class PrettyPrinter(Printer): - - LimArg = self._print(z) - if self._use_unicode: -- LimArg = prettyForm(*LimArg.right(u'\N{BOX DRAWINGS LIGHT HORIZONTAL}\N{RIGHTWARDS ARROW}')) -+ LimArg = prettyForm(*LimArg.right(u'BOX DRAWINGS LIGHT HORIZONTALRIGHTWARDS ARROW')) - else: - LimArg = prettyForm(*LimArg.right('->')) - LimArg = prettyForm(*LimArg.right(self._print(z0))) -@@ -589,7 +589,7 @@ class PrettyPrinter(Printer): - dir = "" - else: - if self._use_unicode: -- dir = u'\N{SUPERSCRIPT PLUS SIGN}' if str(dir) == "+" else u'\N{SUPERSCRIPT MINUS}' -+ dir = u'SUPERSCRIPT PLUS SIGN' if str(dir) == "+" else u'SUPERSCRIPT MINUS' - - LimArg = prettyForm(*LimArg.right(self._print(dir))) - -@@ -740,7 +740,7 @@ class PrettyPrinter(Printer): - def _print_Adjoint(self, expr): - pform = self._print(expr.arg) - if self._use_unicode: -- dag = prettyForm(u'\N{DAGGER}') -+ dag = prettyForm(u'DAGGER') - else: - dag = prettyForm('+') - from sympy.matrices import MatrixSymbol -@@ -850,8 +850,8 @@ class PrettyPrinter(Printer): - if '\n' in partstr: - tempstr = partstr - tempstr = tempstr.replace(vectstrs[i], '') -- tempstr = tempstr.replace(u'\N{RIGHT PARENTHESIS UPPER HOOK}', -- u'\N{RIGHT PARENTHESIS UPPER HOOK}' -+ tempstr = tempstr.replace(u'RIGHT PARENTHESIS UPPER HOOK', -+ u'RIGHT PARENTHESIS UPPER HOOK' - + ' ' + vectstrs[i]) - o1[i] = tempstr - o1 = [x.split('\n') for x in o1] -@@ -1153,7 +1153,7 @@ class PrettyPrinter(Printer): - def _print_Lambda(self, e): - vars, expr = e.args - if self._use_unicode: -- arrow = u" \N{RIGHTWARDS ARROW FROM BAR} " -+ arrow = u" RIGHTWARDS ARROW FROM BAR " - else: - arrow = " -> " - if len(vars) == 1: -@@ -1173,7 +1173,7 @@ class PrettyPrinter(Printer): - elif len(expr.variables): - pform = prettyForm(*pform.right(self._print(expr.variables[0]))) - if self._use_unicode: -- pform = prettyForm(*pform.right(u" \N{RIGHTWARDS ARROW} ")) -+ pform = prettyForm(*pform.right(u" RIGHTWARDS ARROW ")) - else: - pform = prettyForm(*pform.right(" -> ")) - if len(expr.point) > 1: -@@ -1462,7 +1462,7 @@ class PrettyPrinter(Printer): - and expt is S.Half and bpretty.height() == 1 - and (bpretty.width() == 1 - or (base.is_Integer and base.is_nonnegative))): -- return prettyForm(*bpretty.left(u'\N{SQUARE ROOT}')) -+ return prettyForm(*bpretty.left(u'SQUARE ROOT')) - - # Construct root sign, start with the \/ shape - _zZ = xobj('/', 1) -@@ -1558,7 +1558,7 @@ class PrettyPrinter(Printer): - from sympy import Pow - return self._print(Pow(p.sets[0], len(p.sets), evaluate=False)) - else: -- prod_char = u"\N{MULTIPLICATION SIGN}" if self._use_unicode else 'x' -+ prod_char = u"MULTIPLICATION SIGN" if self._use_unicode else 'x' - return self._print_seq(p.sets, None, None, ' %s ' % prod_char, - parenthesize=lambda set: set.is_Union or - set.is_Intersection or set.is_ProductSet) -@@ -1570,7 +1570,7 @@ class PrettyPrinter(Printer): - def _print_Range(self, s): - - if self._use_unicode: -- dots = u"\N{HORIZONTAL ELLIPSIS}" -+ dots = u"HORIZONTAL ELLIPSIS" - else: - dots = '...' - -@@ -1641,7 +1641,7 @@ class PrettyPrinter(Printer): - - def _print_ImageSet(self, ts): - if self._use_unicode: -- inn = u"\N{SMALL ELEMENT OF}" -+ inn = u"SMALL ELEMENT OF" - else: - inn = 'in' - variables = self._print_seq(ts.lamda.variables) -@@ -1653,10 +1653,10 @@ class PrettyPrinter(Printer): - - def _print_ConditionSet(self, ts): - if self._use_unicode: -- inn = u"\N{SMALL ELEMENT OF}" -+ inn = u"SMALL ELEMENT OF" - # using _and because and is a keyword and it is bad practice to - # overwrite them -- _and = u"\N{LOGICAL AND}" -+ _and = u"LOGICAL AND" - else: - inn = 'in' - _and = 'and' -@@ -1677,7 +1677,7 @@ class PrettyPrinter(Printer): - - def _print_ComplexRegion(self, ts): - if self._use_unicode: -- inn = u"\N{SMALL ELEMENT OF}" -+ inn = u"SMALL ELEMENT OF" - else: - inn = 'in' - variables = self._print_seq(ts.variables) -@@ -1690,7 +1690,7 @@ class PrettyPrinter(Printer): - def _print_Contains(self, e): - var, set = e.args - if self._use_unicode: -- el = u" \N{ELEMENT OF} " -+ el = u" ELEMENT OF " - return prettyForm(*stringPict.next(self._print(var), - el, self._print(set)), binding=8) - else: -@@ -1698,7 +1698,7 @@ class PrettyPrinter(Printer): - - def _print_FourierSeries(self, s): - if self._use_unicode: -- dots = u"\N{HORIZONTAL ELLIPSIS}" -+ dots = u"HORIZONTAL ELLIPSIS" - else: - dots = '...' - return self._print_Add(s.truncate()) + self._print(dots) -@@ -1708,7 +1708,7 @@ class PrettyPrinter(Printer): - - def _print_SeqFormula(self, s): - if self._use_unicode: -- dots = u"\N{HORIZONTAL ELLIPSIS}" -+ dots = u"HORIZONTAL ELLIPSIS" - else: - dots = '...' - diff --git a/pythonforandroid/recipes/sympy/fix_timeutils.patch b/pythonforandroid/recipes/sympy/fix_timeutils.patch deleted file mode 100644 index c8424eaa2c..0000000000 --- a/pythonforandroid/recipes/sympy/fix_timeutils.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sympy/utilities/timeutils.py b/sympy/utilities/timeutils.py -index 3770d85..c53594e 100644 ---- a/sympy/utilities/timeutils.py -+++ b/sympy/utilities/timeutils.py -@@ -8,7 +8,7 @@ import math - from sympy.core.compatibility import range - - _scales = [1e0, 1e3, 1e6, 1e9] --_units = [u's', u'ms', u'\N{GREEK SMALL LETTER MU}s', u'ns'] -+_units = [u's', u'ms', u'mus', u'ns'] - - - def timed(func, setup="pass", limit=None): From ed3295f31d946becfb3ba8768a9810a3d0a84a77 Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Sun, 14 Sep 2025 17:25:11 +0530 Subject: [PATCH 2/2] Delete pythonforandroid/recipes/sympy directory --- pythonforandroid/recipes/sympy/__init__.py | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 pythonforandroid/recipes/sympy/__init__.py diff --git a/pythonforandroid/recipes/sympy/__init__.py b/pythonforandroid/recipes/sympy/__init__.py deleted file mode 100644 index 5420bf0379..0000000000 --- a/pythonforandroid/recipes/sympy/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -from pythonforandroid.recipe import PyProjectRecipe - - -class SympyRecipe(PyProjectRecipe): - - version = '1.14.0' - url = 'https://github.com/sympy/sympy/archive/refs/tags/{version}.zip' - depends = ['mpmath'] - hostpython_prerequisites = ['setuptools', 'build'] - call_hostpython_via_targetpython = False - install_in_hostpython = True - - -recipe = SympyRecipe()