-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unable to install constraint artifactory dependencies with nox: Conflicting dependencies, but equal versions #681
Comments
Thanks for the detailed report! Could this be related to #398 ? The repository config is currently not forwarded to pip. So you would need to explicitly configure pip, for example by creating a pip.ini file in the If that doesn't help, could you post the output of the |
Hey @cjolowicz. It surely got us in the right direction. Since I'm using in-project venvs and don't want to fiddle around with the users pip config, I decided to try to manually add the argument to the session.install call. This works! E.g. replacing @session(python="3.7.1")
def test(nox_session: Session) -> None:
nox_session.install(".") with @session(python="3.7.1")
def test(nox_session: Session) -> None:
nox_session.install(".", "--extra-index-url", "https://URL_TO_PYPI_AT_COMPANY_ARTIFACTORY/simple/") I added a function my noxfile to automatically extract the artifactory URL from the according section in the pyproject.toml to reduce duplication. E.g.: def get_extra_index_url(repository_name: str = "artifactory"):
with open('pyproject.toml', 'r') as file:
pyproject_toml = toml.load(file)
return next((source.get("url") for source in pyproject_toml["tool"]["poetry"].get("source", []) if source["name"] == repository_name), "") and then adding the url as above. Thanks a lot for the help. Would it make sense to make this a feature in nox-poetry? Or do you think users should add if required (then maybe a mention in the docs would make sense)? |
Dear @cjolowicz,
Thanks for the great work you put into the hypermodern Python part - this really inspired me! So the problem I have is hopefully something to improve the framework and not just a user layer error ;-)
Problem Description
Additional steps & observations
poetry install
and that it is present in the project-internal virtual environment (.venv/Lib/site-packages/
)pip install
in the virtual environment of.nox/test/Scripts/python.exe
) -> Observed the same error.venv/Scripts/python.exe
) -> Success and confirmed that the package is already installed:Any help would be greatly appreciated!
Details
Here is minimal working example to reproduce the error (still requiring an artifactory to download from).
Note: All internals have been replaced with Uppercase words for confidentially reasons.
System setup
Project layout
Installation script
Follow these steps to setup the project
noxfile
Simple executes an dot-install.
pyproject.toml
The text was updated successfully, but these errors were encountered: