-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
build-system.requires ignored for tool.poetry.build.script #8807
Comments
you should not use just call please close |
Ah, I am sorry, I did not realize I still had
Thanks for pointing for that issue. Indeed it seems to be caused by the fact that the |
I do not think this is a duplicate of #8749:
|
I - almost immediately - deleted the comment referencing #8749, I also don't think this is a duplicate. Sorry for confusion. You should set |
Setting
However this patch solves my issue:
I am happy to create a pull request if you agree with the approach. |
I do not reproduce:
which I guess is expected while setuptools is not declared as a build requirement when I add it the error becomes |
take it back, I have a (different) protoc available in my wider environment |
I don't know what the right fix is but I'm pretty sure that it's not going to be what you suggest - updating |
I agree, I am a little hesitant about that. Alternatives can be:
|
another approach would just not to try and do this via build requirements - there's at least a case that installing executables isn't really what build requirements are for eg if you were trying to use the compiler from your build script, you wouldn't expect to be able to list you could just tell people that having |
I think it would be a reasonable expectation that if I need package X to build my module, I can add it to the build-requirements.
It would not be a horrible idea, I think
This adds friction. I am building a pure python module that needs some processing to be built. The tool to do the processing is available as pypi package. Why not allowing users to specify that in the build-requirements instead of having to write it somewhere the user needs read and execute manually? |
Relates to python-poetry/poetry-core#319 |
I am also having problems using a binary that's installed for a build. In my example it's I have a
With import subprocess
def main():
print("Running `pyside6-uic --help`...")
result = subprocess.run(
["pyside6-uic", "--help"],
check=True, # Raise exception on failure
capture_output=True,
)
if __name__ == "__main__":
main() This works during Note that the package itself can be imported just fine, it runs if I include To debug this further, I added the following to my build script: subprocess.run(["cmd.exe", "/c", "echo", "%PATH%"])
print(sys.path)
sleep(30.0) Running
And (while the install command is hanging) I see the file Running
There is no Finally, I noticed something interesting. Installing
So the binary from the project But activating the |
Having the same issue. What's the current status? |
Poetry version: 1.7.1
Python version: 3.10.12
OS version and name: Ubuntu 22.04
pyproject.toml: pyproject.toml
build.py: build.py
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
In my pyproject.toml I have
and my build.py invokes the
protoc
command, which is provided by theprotoc-exe
module, listed in[build-system]
.This works fine with
poetry install --sync
:But it fails with
poetry build
:(full output with
-vvv
)In the case of
poetry build
, the commandprotoc
is in thebin
directory of the virtualenv, but thebin
directory is not added to the PATH environment variable.Setting
generate-setup-file = true
does not help.The text was updated successfully, but these errors were encountered: