Purpose: Use python to run on iOS and android.
pyproject.toml
requires = [
"litesync",
]
Shown erro when executing briefcase update iOS -r
:
Building wheels for collected packages: litesync, PyYAML
Building wheel for litesync (setup.py): started
Building wheel for litesync (setup.py): finished with status 'done'
WARNING: Legacy build of wheel for 'litesync' created no files.
Command arguments: /Users/ben/Github/MenuSifu/mspyshell/venv/bin/python3 -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/private/var/folders/9l/1h4kh9kd5236t_rjrc7n7ldw0000gn/T/pip-install-ur3a_qe0/litesync_5454d626249c4f13905ca1fc7d3ff290/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /private/var/folders/9l/1h4kh9kd5236t_rjrc7n7ldw0000gn/T/pip-wheel-gnit89cf
Command output: [use --verbose to show]
Running setup.py clean for litesync
Building wheel for PyYAML (pyproject.toml): started
Building wheel for PyYAML (pyproject.toml): finished with status 'done'
Created wheel for PyYAML: filename=PyYAML-6.0.1-cp39-cp39-macosx_10_9_universal2.whl size=45368 sha256=79e8e30e544c121c8f4e969e0a1ab48c352e6773dfb61014e8c2ab95eb6c5f7e
Stored in directory: /Users/ben/Library/Caches/pip/wheels/54/a0/ff/f8b8f3dd92359aeb7c100cadb982c20e74b8fd79732f0305e9
Successfully built PyYAML
Failed to build litesync
ERROR: Could not build wheels for litesync, which is required to install pyproject.toml-based projects
Installing app requirements for iPhone device...
Unable to install requirements. This may be because one of your
requirements is invalid, or because pip was unable to connect
to the PyPI server.
Then I tried to use mobile-forge for packaging, but still got an error.
Why use mobile-forge
? https://briefcase.readthedocs.io/en/stable/reference/platforms/iOS.html#availability-of-third-party-packages
ld: warning: -undefined dynamic_lookup is deprecated on iOS
ld: building for 'iOS', but linking in dylib (/usr/local/lib/liblitesync.0.dylib) built for 'macOS'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/Users/ben/Work/Dev/Python/Python-Apple-support/support/3.8/iOS/bin/arm64-apple-ios12.0-clang' failed with exit code 1
Traceback (most recent call last):
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 119, in _file_with_extension
(file,) = matching
ValueError: not enough values to unpack (expected 1, got 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 404, in build_wheel
return self._build_with_temp_dir(
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 391, in _build_with_temp_dir
result_basename = _file_with_extension(tmp_dist_dir, result_extension)
File "/Users/ben/Work/Dev/Python/mobile-forge/build/cp38/litesync/0.4.8/venv3.8-ios_12_0_iphoneos_arm64/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 121, in _file_with_extension
raise ValueError(
ValueError: No distribution was found. Ensure that `setup.py` is not empty and that it calls `setup()`.
ERROR Backend subprocess exited when trying to invoke build_wheel
--------------------------------------------------------------------------------
<<< Return code: 1
********************************************************************************
Failed build: litesync 0.4.8 for iphoneos 12.0 on arm64
********************************************************************************
Traceback (most recent call last):
File "/Users/ben/Work/Dev/Python/mobile-forge/src/forge/build.py", line 267, in build
self._build()
File "/Users/ben/Work/Dev/Python/mobile-forge/src/forge/build.py", line 510, in _build
self.cross_venv.run(
File "/Users/ben/Work/Dev/Python/mobile-forge/src/forge/cross.py", line 356, in run
return subprocess.run(logfile, *args, **self.cross_kwargs(kwargs))
File "/Users/ben/Work/Dev/Python/mobile-forge/src/forge/subprocess.py", line 49, in run
raise stdlib_subprocess.CalledProcessError(return_code, args)
subprocess.CalledProcessError: Command '(['python', '-m', 'build', '--no-isolation', '--wheel', '--outdir', '/Users/ben/Work/Dev/Python/mobile-forge/dist'],)' returned non-zero exit status 1.
So I don't know what to do now to use litesync cross-platform in python.