Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken recipes with missing arch.arch in get_site_packages_dir #2503

Merged
merged 2 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ci/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class TargetPython(Enum):
'vlc',
# need extra gfortran NDK system add-on
'lapack', 'scipy',
# Outdated and there's a chance that is now useless.
'zope_interface',
# Requires zope_interface, which is broken.
'twisted',
])

BROKEN_RECIPES = {
Expand Down
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),
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/libtorrent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def build_arch(self, arch):

python_libtorrent = get_lib_from(join(build_dir, 'bindings/python/bin'))
shutil.copyfile(python_libtorrent,
join(self.ctx.get_site_packages_dir(arch.arch), 'libtorrent.so'))
join(self.ctx.get_site_packages_dir(arch), 'libtorrent.so'))

def get_recipe_env(self, arch):
# Use environment from boost recipe, cause we use b2 tool from boost
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),
'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)
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), '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),
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))
self.install_python_package(arch)


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/zope_interface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def build_arch(self, arch):
# folders (once is installed), that leads into an ImportError.
# Here we intentionally apply a patch to solve that, so, in case that
# this is solved in the future an error will be triggered
zope_install = join(self.ctx.get_site_packages_dir(arch.arch), 'zope')
zope_install = join(self.ctx.get_site_packages_dir(arch), 'zope')
self.apply_patch('fix-init.patch', arch.arch, build_dir=zope_install)

def prebuild_arch(self, arch):
Expand Down