briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

`requirement_installer_args` doesn't work with Android on Windows

Open mhsmith opened this issue 2 weeks ago • 1 comments

Describe the bug

Originally reported by @aendie in https://github.com/beeware/briefcase/issues/2587#issuecomment-3608735684


I get the error no such option: --find-links I created the sgp4 wheel sgp4-2.25-py3-none-any.whl and moved it into a folder "wheels" beneath the file pyproject.toml, which begins as follows:

[tool.briefcase]
project_name = "Skyalmanac"
bundle = "com.example"
version = "0.0.1"
url = "https://example.com/skyalmanac"
license.file = "LICENSE"
author = "Andrew Developer"
author_email = "[email protected]"

[tool.briefcase.app.skyalmanac]
formal_name = "Skyalmanac"
description = "Skyalmanac for Android"
long_description = """This is equivalent to a mini-version of Skyalmanac
that is published in PyPI. It only supports creation of
Sun tables and the Nautical Almanac.
"""
sources = [
    "src/skyalmanac",
]
test_sources = [
    "tests",
]

requirement_installer_args = ["--find-links", "./wheels"]

requires = [
"numpy", 
"pandas",
"skyfield==1.49"
]
test_requires = [
    "pytest",
]

I run briefcase create android with overwrite {y/N}? y then run briefcase build android:

Image

briefcase.2025_12_05-16_21_05.build.log

Does this mean anything to you? I really appreciate a little help here.

Environment

  • Operating System: Android on WIndows
  • Software versions:
    • Briefcase: 0.3.25

mhsmith avatar Dec 11 '25 10:12 mhsmith

The code in build.gradle splits the pip options file using \n, but on Windows it's written using \r\n, so \r is treated as part of the option name. In which case, this entire feature has never worked when building for Android on Windows. This is obviously a gap in our test coverage.

I'm working on a fix in https://github.com/beeware/briefcase-android-gradle-template/pull/108. You can use it by adding these lines to the android section of your pyproject.toml file, then re-running briefcase create android:

template = "https://github.com/mhsmith/briefcase-android-gradle-template"
template_branch = "pip-options-newlines"

mhsmith avatar Dec 11 '25 10:12 mhsmith