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

Local path references in requirements fail on AppImage builds #992

Closed
freakboy3742 opened this issue Dec 7, 2022 · 0 comments · Fixed by #993
Closed

Local path references in requirements fail on AppImage builds #992

freakboy3742 opened this issue Dec 7, 2022 · 0 comments · Fixed by #993
Labels
bug A crash or error in behavior. linux The issue relates Linux support.

Comments

@freakboy3742
Copy link
Member

If a project contains a local file reference in it's requires or test_requires list, that reference will fail when building an AppImage, as the file path won't be valid in a Docker context.

To Reproduce
Steps to reproduce the behavior:

  1. Generate a helloworld Toga project
  2. Modify pyproject.toml to reference a local Toga checkout (i.e., `requires = ["../../toga/core", "../../toga/gtk"])
  3. See error
[testbed] Entering Docker context...
WARNING: The directory '/home/brutus/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
ERROR: Invalid requirement: '../core'
Hint: It looks like a path. File '../core' does not exist.

Notice:  A new release of pip available: 22.3 -> 22.3.1
Notice:  To update, run: python3.11 -m pip install --upgrade pip
Installing app requirements...


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.

Log saved to /home/runner/work/toga/toga/testbed/logs/briefcase.2022_12_06-21_06_23.run.log

Expected behavior

It should be possible to specific a requirement as a local file and have that requirement be installed at runtime

Environment:

  • Operating System: Any Linux
  • Python version: Any
  • Software versions:
    • Briefcase: 0.3.11

Additional context

A similar problem was seen with Android and Flatpak; however, those two platforms use requirements files, and the problem could only existed if the file reference was relative. The problem could be resolved in those cases by converting the file reference to an absolute reference. The analogous fix here will be to expose the local requirement as a volume mount in the Docker context.

@freakboy3742 freakboy3742 added bug A crash or error in behavior. linux The issue relates Linux support. labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. linux The issue relates Linux support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant