-
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
Sdist build fails in projects with build.py #1188
Comments
I think this might confirm my guess. This is what the output looks like with the latest poetry release:
|
This is only triggered in Poetry projects using the undocumented build script support. Here's a minimal repro: # pyproject.toml
[tool.poetry]
name = "example"
version = "0.1.0"
description = ""
authors = ["your name <[email protected]>"]
build = "build.py"
[tool.poetry.dependencies]
python = "^3.11"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" # build.py
def build(setup_kwargs):
pass # noxfile.py
from nox_poetry import session
@session
def test(session):
session.poetry.installroot(distribution_format="sdist") The rest of the files as generated by Running nox: ❯ nox
nox > Running session test
nox > Creating virtual environment (virtualenv) using python in .nox/test
nox > poetry build --format=sdist --no-ansi
Preparing build environment with build-system requirements poetry-corenox > poetry --version --no-ansi
nox > poetry export --format=requirements.txt --without-hashes
nox > pip uninstall --yes 'file:///private/var/folders/x1/jpjk1s6n39qbb5wxldt5ms6c0000gn/T/tmp.i3TGU7yXyi/example/dist/%280.1.0%29#egg=example'
nox > pip cache remove example
nox > python -m pip install --constraint=.nox/test/tmp/requirements.txt 'file:///private/var/folders/x1/jpjk1s6n39qbb5wxldt5ms6c0000gn/T/tmp.i3TGU7yXyi/example/dist/%280.1.0%29#egg=example'
nox > Command python -m pip install --constraint=.nox/test/tmp/requirements.txt 'file:///private/var/folders/x1/jpjk1s6n39qbb5wxldt5ms6c0000gn/T/tmp.i3TGU7yXyi/example/dist/%280.1.0%29#egg=example' failed with exit code 1:
Processing ./dist/(0.1.0)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/private/var/folders/x1/jpjk1s6n39qbb5wxldt5ms6c0000gn/T/tmp.i3TGU7yXyi/example/dist/(0.1.0)'
nox > Session test failed. Running Poetry: ❯ poetry build
Preparing build environment with build-system requirements poetry-core
Building example (0.1.0) Running Poetry without build script: ❯ poetry build
Building example (0.1.0)
- Building sdist
- Built example-0.1.0.tar.gz
- Building wheel
- Built example-0.1.0-py3-none-any.whl |
Nox currently doesn't have a good way to invoke PEP 517 build hooks like
Note that I'm open for better suggestions. Calling the build hook in a robust, cross-platform way would be great, but I don't really see how. If there was a mechanism to invoke |
The |
Hi, I recently upgraded poetry to the latest release and I'm having issues running nox tests. I haven't changed anything other than upgrading poetry and nox.
Here's my noxfile.py. (Last edited two years ago...)
It looks like the SDIST usage varies from what I found in current documentation, but changing that to use the string didn't seem to help.
Here's the error I'm seeing:
As a wild guess It looks like maybe that
(0.3.2)
comes from processing poetry output which might have changed??Using
poetry build
manually produces the following files:I'm not sure where to start debugging this. Any advice you can offer would be greatly appreciated.
Regards
The text was updated successfully, but these errors were encountered: