-
Notifications
You must be signed in to change notification settings - Fork 254
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
Support build system requires and enable use of custom executable for build script execution #58
Conversation
@sdispater any issues with this approach? The change in poetry would look something like this python-poetry/poetry@6a73f4e. |
66bd42d
to
0658ad0
Compare
0658ad0
to
cb72178
Compare
Relates-to: #2789
Relates-to: #2789
cb72178
to
ba8fc3e
Compare
@abn I don't think we should consider the Any extra logic should only be handled by builders (editable or wheel). I am not sure how we can approach this yet, though. |
@sdispater not sure if I fully agree there. To me, non-poetry build requirements are part of the development envionnment just as much as any other development dependency of the project as without it we cannot develop the package. Ofcourse, we can add it explicitly to the Unless we start having a "poetry" venv per project isolated from the main envrionemnt for tasks like executing build scripts and even running I guess another approach might to revisit this once we have tagging and have reserved tags like |
@sdispater while we put this on ice for now, I have broken out some enhancements in this PR into individual ones so we can handle build-system dependency logic in editable installs a bit more cleanly. |
@sdispater as an additional follow up to this one. Would you say that if a package's build script requires an external package, it should be perhaps defined not in the [tool.poetry.build]
script = "build.py"
[tool.poetry.build.dependencies]
cpython = "*" This would lend itself well to the use of PEP 517 optional hooks. It, however, will make this a "poetry" config. I am unsure which is the better option here. I like this approach because it is more explicit and can allow us to manage this via the cli cleanly. |
@sdispater any furhter thoughts on this? |
Closing this in favour of python-poetry/poetry#5401 for now. |
This change adds
build-system.requires
requirements other thanpoetry
andpoetry-core
as a dependency for the package (marked withbuild
category). This is required in order to allow forpoetry
to effectively manage development environments, for example when the project is installed as an editable package during development. In scenarios where a build script is executed, and it requirescython
(as an example), today this will fail unlesscython
is listed as adev-dependency
explicitly. This change allows for this to be detected frombuild-system
configuration table and handled transparently.Additionally, in order to allow for build script execution under development environment, we allow for the python executable used to be configurable.
Relates-to: python-poetry/poetry#2789