Skip to content

Commit

Permalink
Fix broken recipes with missing arch.arch in get_site_packages_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 committed Oct 12, 2021
1 parent 8903522 commit 4ab02ef
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/cffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_recipe_env(self, arch=None):
# required for libc and libdl
env['LDFLAGS'] += ' -L{}'.format(arch.ndk_lib_dir)
env['PYTHONPATH'] = ':'.join([
self.ctx.get_site_packages_dir(),
self.ctx.get_site_packages_dir(arch.arch),
env['BUILDLIB_PATH'],
])
env['LDFLAGS'] += ' -L{}'.format(self.ctx.python_recipe.link_root(arch.arch))
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True):
# the matplotlib script where to find our numpy without importing it
# (which will fail, because numpy isn't installed in our hostpython)
env['NUMPY_INCLUDES'] = join(
self.ctx.get_site_packages_dir(),
self.ctx.get_site_packages_dir(arch.arch),
'numpy', 'core', 'include',
)

Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/opencv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def build_arch(self, arch):

python_major = self.ctx.python_recipe.version[0]
python_include_root = self.ctx.python_recipe.include_root(arch.arch)
python_site_packages = self.ctx.get_site_packages_dir()
python_site_packages = self.ctx.get_site_packages_dir(arch.arch)
python_link_root = self.ctx.python_recipe.link_root(arch.arch)
python_link_version = self.ctx.python_recipe.link_version
python_library = join(python_link_root,
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/protobuf_cpp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def install_python_package(self, arch):
# - https://stackoverflow.com/questions/13862562/
# google-protocol-buffers-not-found-when-trying-to-freeze-python-app
open(
join(self.ctx.get_site_packages_dir(), 'google', '__init__.py'),
join(self.ctx.get_site_packages_dir(arch.arch), 'google', '__init__.py'),
'a',
).close()

Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/twisted/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_recipe_env(self, arch):
env = super().get_recipe_env(arch)
# We add BUILDLIB_PATH to PYTHONPATH so twisted can find _io.so
env['PYTHONPATH'] = ':'.join([
self.ctx.get_site_packages_dir(),
self.ctx.get_site_packages_dir(arch.arch),
env['BUILDLIB_PATH'],
])
return env
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/xeddsa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def build_arch(self, arch):
)
# the library could be `_crypto_sign.cpython-37m-x86_64-linux-gnu.so`
# or simply `_crypto_sign.so` depending on the platform/distribution
sh.cp('-a', sh.glob('_crypto_sign*.so'), self.ctx.get_site_packages_dir())
sh.cp('-a', sh.glob('_crypto_sign*.so'), self.ctx.get_site_packages_dir(arch.arch))
self.install_python_package(arch)


Expand Down

0 comments on commit 4ab02ef

Please sign in to comment.