-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow editable installs of dev Python packages #7097
Allow editable installs of dev Python packages #7097
Conversation
This commit adds a fallback for the README definition in the generated setup.py files for Python SDKs, thus allowing editable installs of packages which not yet been built.
PR is now waiting for a maintainer to run the acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR |
/run-acceptance-tests |
Please view the results of the PR Build + Acceptance Tests Run Here |
PR is now waiting for a maintainer to run the acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself LGTM.
Is this the only issue that currently prevents the source Python package from being installed?
@lukehoban Yes - the missing README gave an ENOENT and fails when trying to install the package from source in place (useful for examples in a component monorepo etc), so adding an obviously-fake README seems like the best fallback (rather than encoding path information to read from the repository root, or copying the top-level README during generation). There's a second issue which I'll follow up with relating to the version placeholder, but that actually does not block installation. |
10894: [sdk/python] Allow editable installs without build step r=justinvp a=justinvp This commit modifies `setup.py` to use a Python variable as the source of the package version instead of a placeholder string and adds a fallback for the README definition. This makes the package installable via the `-e` flag directly from its source directory (`sdk/python/lib`), rather than having a build step and having to `-e` install the built directory (`sdk/python/env/src`). This is equivalent to some changes we've made in our generated Python provider SDKs (#7097 and #7479), making the core SDK consistent with those. Co-authored-by: Justin Van Patten <jvp@justinvp.com>
Description
This commit adds a fallback for the README definition in the generated setup.py files for Python SDKs, thus allowing editable installs of packages which not yet been built.
Checklist
Codegen tests do not appear to test setup.py generation.