Closed zillionare closed 2 years ago
You cannot create a useful package that depends on local file dependencies. This is not a poetry thing, it's just how the world is.
However you express the dependency, and whether or not you try to bundle a wheel within a wheel: the path that you point at simply won't exist for the user trying to install the package.
What you are trying to do cannot work.
You cannot create a useful package that depends on local file dependencies. This is not a poetry thing, it's just how the world is.
However you express the dependency, and whether or not you try to bundle a wheel within a wheel: the path that you point at simply won't exist for the user trying to install the package.
What you are trying to do cannot work.
Hi dimbleby: thanks for replying.
from poetry's document (https://poetry.eustace.io/docs/versions/#multiple-constraints-dependencies) and https://github.com/python-poetry/poetry/issues/1616, I think poetry should already supported this usage, just it doesn't work on my case (or, i don't know how to make it work).
and I had already packed the required wheels to release package by specify it in "include" section, as my pyproject.toml says. poetry build doesn't complain about this at all and I have checked omicron.whl, the required package (which is ta-libwin64.whl) already in it.
hope it's more clear now.
by the way, if this is not a case poetry should support, what the use case when we add local file dependency by poetry add
? Just for development mode?
poetry supports file dependencies for local development.
However you cannot expect to build a wheel that has a file dependency and then install that wheel. This bit:
include = [
"packages/TA_Lib-0.4.24-cp38-cp38-win_amd64.whl"
]
cannot help
poetry supports file dependencies for local development.
However you cannot expect to build a wheel that has a file dependency and then install that wheel. This bit:
include = [ "packages/TA_Lib-0.4.24-cp38-cp38-win_amd64.whl" ]
cannot help
understand. Would you please address this in documentation if it's not addressed already?
poetry supports file dependencies for local development.
However you cannot expect to build a wheel that has a file dependency and then install that wheel. This bit:
include = [ "packages/TA_Lib-0.4.24-cp38-cp38-win_amd64.whl" ]
cannot help
still not understood, sorry. What's the point that we add this deps to pyproject file just for local development? I guess after poetry build
, we still cannot install that package locally?
to reiterate, this is not a poetry question. No tool can build a useful wheel with a file dependency, because a path on your machine will not exist or contain the same items as a path on some other user's machine.
Poetry can be used as the only tool to manage/install your application (in which case file/URL direct dependencies are something you can reason about), or as a tool to develop a package to distribute and depend on elsewhere. For the latter use case, you cannot use direct dependencies as they will not be available to all users.
You should use a constraint and publish your package to an index if you want to depend on it in your package.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
[ x] I am on the latest Poetry version.
[x ] I have searched the issues of this repo and believe that this is not a duplicate.
[ x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: windows 11 Home
Poetry version: 1.2.0
the pyproject.toml:
the problem I tried to solving is to install ta-lib, which involves native talib.lib. On windows there's pre-built wheels available, and I decide to include it to my package, so I add this by:
and put the wheel to ./packages folder (which is at same level as pyproject.toml, and included by:
things works well until now. However, when I tried to install my package (which name is omicron), it always failed with:
I wonder the path sep should be '\' instead of '/' ? however, with '\', it doesn't work too.