-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Rely on pip for setup.py develop #4955
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
Conversation
c519001
to
018a20c
Compare
There are almost certainly some incompatibilities with this change. For example, it increases the reliance on pip. It removes uninstall support (although uninstall is still available using pip). The output almost certainly changes. Also, because the installation goes through PEP 517, the installation layout will be different. That said, this feature is intended to provide a soft landing for the users and workflows still reliant on |
…> `[uv ]pip install --no-build-isolation [-e ].` (#156027) Modernize the development installation: ```bash # python setup.py develop python -m pip install --no-build-isolation -e . # python setup.py install python -m pip install --no-build-isolation . ``` Now, the `python setup.py develop` is a wrapper around `python -m pip install -e .` since `setuptools>=80.0`: - pypa/setuptools#4955 `python setup.py install` is deprecated and will emit a warning during run. The warning will become an error on October 31, 2025. - https://github.com/pypa/setuptools/blob/9c4d383631d3951fcae0afd73b5d08ff5a262976/setuptools/command/install.py#L58-L67 > ```python > SetuptoolsDeprecationWarning.emit( > "setup.py install is deprecated.", > """ > Please avoid running ``setup.py`` directly. > Instead, use pypa/build, pypa/installer or other > standards-based tools. > """, > see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html", > due_date=(2025, 10, 31), > ) > ``` - pypa/setuptools#3849 Additional Resource: - [Why you shouldn't invoke setup.py directly](https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html) Pull Request resolved: #156027 Approved by: https://github.com/ezyang
## Change Description Fixes #15009 At some point, following the steps to spin up the dev server began to fail with an error like ``` File "/Users/kchandra/workspace/hail/devbin/dev_proxy.py", line 8, in <module> from web_common import render_template, setup_aiohttp_jinja2, setup_common_static_routes ImportError: cannot import name 'render_template' from 'web_common' (unknown location) ``` As far as I can tell, the context for what happened is something like this: - There is a long-standing effort to standardize Python builds and installs - see [PEP517](https://peps.python.org/pep-0517/) and [PEP660](https://peps.python.org/pep-0660/), which define a new standard for editable installs. - As part of this, the legacy mechanism used by `setuptools` for editable installs will be deprecated in favor of the new standardized solution: pypa/pip#11457 - Recent `setuptools` updates have begun to migrate users off of the legacy mechanism (ex. pypa/setuptools#4955). In theory, if our packages use `src` layout & have moved from `setup.py` to `pyproject.toml`, this should have had no effect. Unfortunately, neither of these conditions are true. - Presumably because of resulting changes in behavior, we're now hitting a [edge case](https://setuptools.pypa.io/en/latest/userguide/development_mode.html#id2) in `setuptools` where the dev proxy imports a local folder in the current directory instead of the installed package with the same name. [`uv_build`](https://docs.astral.sh/uv/concepts/build-backend/) supports the new install mechanisms and we're using `uv` elsewhere already, so this seemed like a good alternative to `setuptools` with the same advantages as `uv`. - `batch make devserver` works both when the packages are installed normally and when they use an editable install. - Verified the remote server still works after a `dev deploy`. ## Security Assessment - This change potentially impacts the Hail Batch instance as deployed by Broad Institute in GCP ### Impact Rating - This change has no security impact ### Impact Description This changes the build system for these three packages, but the build artifacts should be the same as before. ### Appsec Review - [ ] Required: The impact has been assessed and approved by appsec --------- Co-authored-by: Patrick Schultz <[email protected]> Co-authored-by: Chris Llanwarne <[email protected]> Co-authored-by: Christopher Vittal <[email protected]>
Removes reliance on easy_install while retaining a develop command, providing some extended support for the develop command while unblocking removal of easy_install.
Ref #917
Summary of changes
Closes
Pull Request Checklist
newsfragments/
.(See documentation for details)