-
Notifications
You must be signed in to change notification settings - Fork 7
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
Failure in non-poetry project #1
Comments
Thank you for the the error report! The plugin is intended to be used with projects that use poetry for their dependency management, but you're correct that it should also handle being installed to a non-poetry project more gracefully. I think adding a check that logs a warning and then skips the rest of the plugin's dependency processing would be a bit more user friendly. |
tox plugins should not assume they are installed in a venv dedicated to a single project. tox is usually installed outside any venv, as it creates the venvs for any project. |
That makes a lot of sense. I always install tox to my project environment, rather than the user/system python, to avoid dependency conflicts so I didn't run into this problem, but you're correct that it's a very valid use case. Adding a debug notice is definitely the proper way to handle it. Thank you for clarifying this, I'll make a patch for it. |
File "/usr/lib/python3.8/site-packages/tox_poetry_installer.py", line 285, in tox_testenv_install_deps
raise err
File "/usr/lib/python3.8/site-packages/tox_poetry_installer.py", line 270, in tox_testenv_install_deps
poetry = PoetryFactory().create_poetry(venv.envconfig.config.toxinidir)
File "/usr/lib/python3.8/site-packages/poetry/factory.py", line 38, in create_poetry
poetry_file = self.locate(cwd)
File "/usr/lib/python3.8/site-packages/poetry/factory.py", line 336, in locate
raise RuntimeError(
RuntimeError: Poetry could not find a pyproject.toml file in /path/to/pytest-djangoapp or its parents |
Sorry, didn't realize that commit would close the issue. If the problem continues please feel free to re-open the issue and I'll try to get a better grasp on what's breaking. |
No worries. This bit is working now. Much appreciated. |
The text was updated successfully, but these errors were encountered: