From d5d8944290ea5335306877629d4b4ac41d41af0a Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi Date: Tue, 29 Dec 2020 11:14:20 +0530 Subject: [PATCH 01/17] testing argon2-cffi --- .../recipes/argon2-cffi/__init__.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pythonforandroid/recipes/argon2-cffi/__init__.py diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py new file mode 100644 index 0000000000..d385fd8bbf --- /dev/null +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -0,0 +1,51 @@ +from pythonforandroid.toolchain import Recipe, shprint, current_directory +from os.path import exists, join +import sh +import glob + + +class YourRecipe(Recipe): + # This could also inherit from PythonRecipe etc. if you want to + # use their pre-written build processes + + version = '20.1.0' + url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' + # {version} will be replaced with self.version when downloading + + depends = ['setuptools', 'cffi'] # A list of any other recipe names + # that must be built before this + # one + + conflicts = [] # A list of any recipe names that cannot be built + # alongside this one + + def get_recipe_env(self, arch): + env = super().get_recipe_env(arch) + # Manipulate the env here if you want + return env + + def should_build(self, arch): + # Add a check for whether the recipe is already built if you + # want, and return False if it is. + return True + + def prebuild_arch(self, arch): + super().prebuild_arch(self) + # Do any extra prebuilding you want, e.g.: + self.apply_patch('path/to/patch.patch') + + def build_arch(self, arch): + print('AAAAAAAA@@I was called@@AAAAAAAA') + super().build_arch(self) + # Build the code. Make sure to use the right build dir, e.g. + with current_directory(self.get_build_dir(arch.arch)): + sh.ls('-lathr') # Or run some commands that actually do + # something + + def postbuild_arch(self, arch): + super().prebuild_arch(self) + # Do anything you want after the build, e.g. deleting + # unnecessary files such as documentation + + +recipe = YourRecipe() \ No newline at end of file From 1f6c5f45b84c9fb5289cde157a056a4d575de8bc Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi Date: Tue, 29 Dec 2020 11:42:19 +0530 Subject: [PATCH 02/17] retrying argon2-cffi test --- .../recipes/argon2-cffi/__init__.py | 49 ++----------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index d385fd8bbf..8b8c1dcd9f 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -1,51 +1,10 @@ -from pythonforandroid.toolchain import Recipe, shprint, current_directory -from os.path import exists, join -import sh -import glob +from pythonforandroid.recipe import PythonRecipe -class YourRecipe(Recipe): - # This could also inherit from PythonRecipe etc. if you want to - # use their pre-written build processes - +class PycryptodomeRecipe(PythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' - # {version} will be replaced with self.version when downloading - - depends = ['setuptools', 'cffi'] # A list of any other recipe names - # that must be built before this - # one - - conflicts = [] # A list of any recipe names that cannot be built - # alongside this one - - def get_recipe_env(self, arch): - env = super().get_recipe_env(arch) - # Manipulate the env here if you want - return env - - def should_build(self, arch): - # Add a check for whether the recipe is already built if you - # want, and return False if it is. - return True - - def prebuild_arch(self, arch): - super().prebuild_arch(self) - # Do any extra prebuilding you want, e.g.: - self.apply_patch('path/to/patch.patch') - - def build_arch(self, arch): - print('AAAAAAAA@@I was called@@AAAAAAAA') - super().build_arch(self) - # Build the code. Make sure to use the right build dir, e.g. - with current_directory(self.get_build_dir(arch.arch)): - sh.ls('-lathr') # Or run some commands that actually do - # something - - def postbuild_arch(self, arch): - super().prebuild_arch(self) - # Do anything you want after the build, e.g. deleting - # unnecessary files such as documentation + depends = ['setuptools', 'cffi'] -recipe = YourRecipe() \ No newline at end of file +recipe = PycryptodomeRecipe() \ No newline at end of file From d3a27101efe1a3114b4bc15a3272fa32771b9b85 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:00:47 +0530 Subject: [PATCH 03/17] Update __init__.py --- pythonforandroid/recipes/argon2-cffi/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 8b8c1dcd9f..c5a2e0a5c9 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -4,7 +4,7 @@ class PycryptodomeRecipe(PythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' - depends = ['setuptools', 'cffi'] + depends = ['cffi'] -recipe = PycryptodomeRecipe() \ No newline at end of file +recipe = PycryptodomeRecipe() From 50de293efbe860644e5fd57214b1614fd1eac66f Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Wed, 30 Dec 2020 01:52:06 +0530 Subject: [PATCH 04/17] Update __init__.py --- pythonforandroid/recipes/argon2-cffi/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index c5a2e0a5c9..71f3c99486 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -1,10 +1,10 @@ from pythonforandroid.recipe import PythonRecipe -class PycryptodomeRecipe(PythonRecipe): +class Argon2Recipe(PythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' - depends = ['cffi'] + depends = ['setuptools', 'cffi'] -recipe = PycryptodomeRecipe() +recipe = Argon2Recipe() From 06720ee462605a0c62148336246de9be29357729 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi Date: Sun, 3 Jan 2021 19:51:38 +0530 Subject: [PATCH 05/17] Using CompiledComponentsPythonRecipe --- pythonforandroid/recipes/argon2-cffi/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 8b8c1dcd9f..f27f1a1d7c 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -1,10 +1,11 @@ -from pythonforandroid.recipe import PythonRecipe +from pythonforandroid.recipe import CompiledComponentsPythonRecipe -class PycryptodomeRecipe(PythonRecipe): +class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' depends = ['setuptools', 'cffi'] + call_hostpython_via_targetpython = False -recipe = PycryptodomeRecipe() \ No newline at end of file +recipe = Argon2Recipe() From e23be18663ead5a9a9cb5a463d9b3fe33b393890 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 20:09:05 +0530 Subject: [PATCH 06/17] Update __init__.py --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 70cc59d48a..e96ef83c2b 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' - depends = ['setuptools', 'cffi'] + depends = ['cffi'] call_hostpython_via_targetpython = False recipe = Argon2Recipe() From bc05d8304c1fe9ecff1ef8bafcc49f088cdedabc Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 20:29:32 +0530 Subject: [PATCH 07/17] Update __init__.py --- pythonforandroid/recipes/argon2-cffi/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index e96ef83c2b..2d3de12923 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,8 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' - depends = ['cffi'] + depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False + recipe = Argon2Recipe() From 8fbb4cd1ceec53bc90410fd4c15e70ae8a5d4e2a Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 20:33:53 +0530 Subject: [PATCH 08/17] adding the extra lines --- pythonforandroid/recipes/argon2-cffi/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 2d3de12923..49edf3e575 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -1,5 +1,6 @@ from pythonforandroid.recipe import CompiledComponentsPythonRecipe + class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' From a396f0676f254301dc1d26677c6d3fc13fc98ea9 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 20:36:22 +0530 Subject: [PATCH 09/17] removing whitespace from line 10 (jeez) --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 49edf3e575..f27f1a1d7c 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -7,5 +7,5 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False - + recipe = Argon2Recipe() From 1c2fb733117647c1632ae3d3483f23da46e8ed0d Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 21:25:02 +0530 Subject: [PATCH 10/17] url change cause the extras of argon2 were excluded --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index f27f1a1d7c..f84c3ae63b 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' - url = 'https://github.com/hynek/argon2-cffi/archive/master.zip' + url = 'url = 'git+https://github.com/hynek/argon2-cffi@{version}' depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False From 023dc26f354531a8253bc99952db2f27f5135f75 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 21:27:01 +0530 Subject: [PATCH 11/17] Update __init__.py --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index f84c3ae63b..b371747d7a 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' - url = 'url = 'git+https://github.com/hynek/argon2-cffi@{version}' + url = 'git+https://github.com/hynek/argon2-cffi@{version}' depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False From 981c01b9952f55aa7d9dbefc2471752b9ffe73a5 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Sun, 3 Jan 2021 21:41:48 +0530 Subject: [PATCH 12/17] remove @version --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index b371747d7a..8d19b96089 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' - url = 'git+https://github.com/hynek/argon2-cffi@{version}' + url = 'git+https://github.com/hynek/argon2-cffi' depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False From ff3f43f0e9e67c802c9700ad17bdd6c29a8ef2e6 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Mon, 4 Jan 2021 09:26:22 +0530 Subject: [PATCH 13/17] added build_cmd --- pythonforandroid/recipes/argon2-cffi/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 8d19b96089..2be2367142 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -6,6 +6,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): url = 'git+https://github.com/hynek/argon2-cffi' depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False + build_cmd = 'build' recipe = Argon2Recipe() From f5146fd42b138c9e46b9655ae008c3b265a99ec3 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Tue, 5 Jan 2021 09:02:11 +0530 Subject: [PATCH 14/17] Update __init__.py --- pythonforandroid/recipes/argon2-cffi/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 2be2367142..0450d789f3 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -8,5 +8,10 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): call_hostpython_via_targetpython = False build_cmd = 'build' + def get_recipe_env(self, arch): + env = super().get_recipe_env(arch) + env['ARGON2_CFFI_USE_SSE2'] = '0' + return env + recipe = Argon2Recipe() From 5b37ba728f44431752a4a9f20cce63bede82129a Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi <59286213+Arjun-Somvanshi@users.noreply.github.com> Date: Tue, 5 Jan 2021 11:32:17 +0530 Subject: [PATCH 15/17] Recipe for argon2-cffi --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 0450d789f3..84dfb1ca0b 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' - url = 'git+https://github.com/hynek/argon2-cffi' + url = 'https://github.com/hynek/argon2-cffi/archive/{version}.tar.gz' depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False build_cmd = 'build' From bc4381bfcc105b9365d92492ba006b2f227b9141 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi Date: Tue, 5 Jan 2021 13:42:52 +0530 Subject: [PATCH 16/17] argon2-cffi recipe --- pythonforandroid/recipes/argon2-cffi/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index 84dfb1ca0b..b24f117df5 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -3,7 +3,7 @@ class Argon2Recipe(CompiledComponentsPythonRecipe): version = '20.1.0' - url = 'https://github.com/hynek/argon2-cffi/archive/{version}.tar.gz' + url = 'git+https://github.com/hynek/argon2-cffi' depends = ['setuptools', 'cffi'] call_hostpython_via_targetpython = False build_cmd = 'build' @@ -14,4 +14,4 @@ def get_recipe_env(self, arch): return env -recipe = Argon2Recipe() +recipe = Argon2Recipe() \ No newline at end of file From 9e0f0b9765a68d29e001015d96e076f4edc3c8b4 Mon Sep 17 00:00:00 2001 From: Arjun Somvanshi Date: Tue, 5 Jan 2021 13:52:34 +0530 Subject: [PATCH 17/17] argon2-cffi recipe final changes --- pythonforandroid/recipes/argon2-cffi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/argon2-cffi/__init__.py b/pythonforandroid/recipes/argon2-cffi/__init__.py index b24f117df5..0450d789f3 100644 --- a/pythonforandroid/recipes/argon2-cffi/__init__.py +++ b/pythonforandroid/recipes/argon2-cffi/__init__.py @@ -14,4 +14,4 @@ def get_recipe_env(self, arch): return env -recipe = Argon2Recipe() \ No newline at end of file +recipe = Argon2Recipe()