Looking for poetry-core in private repo?
- [X ] I have searched the issues of this repo and believe that this is not a duplicate.
- [X ] I have searched the documentation and believe that my question is not covered.
Issue
Poetry version 1.1.11
Python 3.8.x
OS Distro Ubuntu 20.04 LTS (Poetry framework not installed)
Tested project on MacOS BigSur 11.6 (Poetry framework installed)
I use poetry in the development of a private project. It works great for dependency management and building a project for distribution to a public or private space. The below .toml file is a likeness of the one used in the building my project, minus the few redacted things for privacy. Now this builds the project with ease and gives me a .whl or tarball file for distribution.
[tool.poetry]
name = "myproject"
version = "0.3.1"
[tool.poetry.dependencies]
python = "^3.8"
pandas = "*"
click = "*"
SQLAlchemy = "*"
poetry-core = "*"
[[tool.poetry.source]]
name = "default"
url = "https://pypi.python.org/simple/"
[[tool.poetry.source]]
name = "redacted"
url = "redacted"
secondary = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.plugins."console_scripts"]
run_function = "myproject.function:main"
When I setup a venv project on my linux machine and pipenv install myproject I get an error that seems odd.
Collecting myproject==0.3.1
Using cached https://repos.private-repo/myproject-0.3.1.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /redacted for privacy --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repos.private-repo -- 'poetry-core>=1.0.0'
cwd: None
Complete output (3 lines):
Looking in indexes: https://repos.private-repo/python
ERROR: Could not find a version that satisfies the requirement poetry-core>=1.0.0 (from versions: none)
ERROR: No matching distribution found for poetry-core>=1.0.0
Why would it be looking for indexes related to poetry-core in my private repo not trying to install from pypi? Now I assume this could be due to the fact that Poetry is not pip installed at the OS level using the curl command Poetry docs provides. I thought thought adding poetry-core as a dependency in my core project pyproject.toml (seen above) would resolve that dependency, but it did not. So does Poetry have to be pip installed at the OS level for any project that uses ["poetry-core>=1.0.0"] as part of the build process?
poetry-core is not in fact installed permanently anywhere, but instead is installed temporarily into ephemeral build environments when non-Poetry tooling builds your project. Where and how those packages are sourced from is the responsibility of the tooling you are using -- in this case it appears to be pipenv, which is using pip to build your package in an isolated environment.
If you have more questions about this, I would suggest a Discussion or Discord as the appropriate places to gather knowledge from.
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.