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

export saves absolute path to dependecy #185

Closed
4 tasks done
cgotschlich opened this issue Mar 3, 2023 · 2 comments
Closed
4 tasks done

export saves absolute path to dependecy #185

cgotschlich opened this issue Mar 3, 2023 · 2 comments

Comments

@cgotschlich
Copy link

  • Poetry version: 1.3.2
  • Python version: 3.9.13
  • OS version and name: Windows Server 2019 Standard, Version 1809
  • pyproject.toml: gist
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

As you can see in my pyproject.toml, I have a dependency that is referenced by a file path:
neoapi = {file = "libs/neoapi-1.2.0-cp39-cp39-win_amd64.whl"}.
When runnning
poetry export --no-hashes -f requirements.txt -o requirements.txt
the corresponding line yields:
neoapi @ file:///C:/blank/neoapi-1.2.0-cp39-cp39-win_amd64.whl ; python_version >= "3.9" and python_full_version < "3.10.0" and python_full_version != "3.9.7".

I think absolute paths make no sense here. If this is intended, please add an option to instead use relative paths.

@finswimmer finswimmer transferred this issue from python-poetry/poetry Mar 5, 2023
@neersighted
Copy link
Member

See python-poetry/poetry#5273; relative paths are not allowed in Python dependency specifications.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2023
@dimbleby
Copy link
Contributor

dimbleby commented Mar 5, 2023

while that's true, requirements.txt is more relaxed / less well defined.

eg among the examples given at https://pip.pypa.io/en/stable/reference/requirements-file-format/#example we find

# It is possible to refer to specific local distribution paths.
./downloads/numpy-1.9.2-cp34-none-win32.whl

Not that I've any intention of doing anything with this one myself, but I don't think it's a completely wrong ask.

(It likely is one of those things where: if the raiser wants it, then they need to contribute it themselves!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants