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

Install poetry dependencies without main package #516

Closed
miracle2k opened this issue Oct 18, 2018 · 4 comments
Closed

Install poetry dependencies without main package #516

miracle2k opened this issue Oct 18, 2018 · 4 comments

Comments

@miracle2k
Copy link

I do this in my Dockerfile:

RUN pip install poetry
COPY poetry.lock .
COPY pyproject.toml .
RUN poetry install

COPY appmodule ./appmodule

This is a nice technique to have Docker cache the dependencies as long as they don't change. This worked perfectly well until recently. The newest versions of poetry complain:

[ValueError]
No file/folder found for package apppackage

Exception trace:
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/poetry/console/commands/install.py in handle() at line 67
   builder = SdistBuilder(self.poetry, NullEnv(), NullIO())
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/poetry/masonry/builders/builder.py in __init__() at line 35
   includes=self._package.include,
 /Users/michael/.pyenv/versions/3.7.0/lib/python3.7/site-packages/poetry/masonry/utils/module.py in __init__() at line 51
   raise ValueError("No file/folder found for package {}".format(name))

It appears I can add

RUN mkdir photoworld_server && touch apppackage/__init__.py

to my Dockerfile to make it work again, but it seems like a hack and I think poetry should support this natively.

@jacebrowning
Copy link
Contributor

I think this might be a duplicate of #512.

@dmytrokyrychuk
Copy link

There are rumors that this has been fixed in 0.12.3. @miracle2k, can you confirm?

@jacebrowning
Copy link
Contributor

It's fixed for me in 0.12.3!

Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants