You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requirements in pyproject.toml files can be in any form accepted by pip install, including paths to local sdists, wheels, or directories. Paths are interpreted relative to the location of the pyproject.toml file.
However, when these paths are copied into a requirements.txt file for Flatpak or Chaquopy, they'll be interpreted relative to the location of the requirements file, which doesn't currently work.
Possible solutions:
Generate the requirements file in the same directory as pyproject.toml. Not ideal, because it would be a platform-specific file generated outside of the platform directory
Convert all relative paths in the requirements file to absolute paths. This is easy, but would prevent the project directory from being relocated.
Convert all relative paths in the requirements file to be relative to the file's location. I think this is the best solution, and there's a os.path.relpath function that should make it just as easy.
The text was updated successfully, but these errors were encountered:
+1 to this needing a fix. I think your intuition about using relative paths is also correct. The biggest complication I can see is how to identify which of the requirements are specified as relative paths - but I guess "does it start with ../ is probably a decent first approximation.
Requirements in pyproject.toml files can be in any form accepted by
pip install
, including paths to local sdists, wheels, or directories. Paths are interpreted relative to the location of the pyproject.toml file.However, when these paths are copied into a requirements.txt file for Flatpak or Chaquopy, they'll be interpreted relative to the location of the requirements file, which doesn't currently work.
Possible solutions:
os.path.relpath
function that should make it just as easy.The text was updated successfully, but these errors were encountered: