Skip to content

Commit

Permalink
sagemathgh-36751: Switch sage-conf to modern editable install
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
This modernization eliminates some deprecation warnings during
installation. It may help solve the problem of the disappearing sage-
conf (https://groups.google.com/g/sage-
release/c/J6mGYH56FKA/m/m9yHivCWAgAJ, https://groups.google.com/g/sage-
release/c/dvPti2UkyjQ/m/2jeUZROzAwAJ, https://groups.google.com/g/sage-
release/c/DeqhtAgi2es/m/DYq13owvAQAJ).

No change to how sagelib is installed; this will be taken care of
separately (sagemath#34209).

In combination with sagemath#36562, which adds `pyproject.toml` for sage-
docbuild, sage-setup, sage-sws2rst, also these distributions are
switched to the modern editable install.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36751
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
  • Loading branch information
Release Manager committed Dec 10, 2023
2 parents 7d3c6d6 + aa5458b commit 4c41db2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ sdh_pip_install() {

sdh_pip_editable_install() {
echo "Installing $PKG_NAME (editable mode)"
# Until https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels
export SETUPTOOLS_ENABLE_FEATURES=legacy-editable
python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable "$@" || \
sdh_die "Error installing $PKG_NAME"
}
Expand Down
2 changes: 2 additions & 0 deletions build/pkgs/sagelib/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ if [ "$SAGE_EDITABLE" = yes ]; then
# and renamed the distribution to "sagemath-standard"). There is no clean way to uninstall
# them, so we just use rm.
(cd "$SITEPACKAGESDIR" && rm -rf sage sage-[1-9]*.egg-info sage-[1-9]*.dist-info)
# Until https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels
export SETUPTOOLS_ENABLE_FEATURES=legacy-editable
time sdh_pip_editable_install .

if [ "$SAGE_WHEELS" = yes ]; then
Expand Down

0 comments on commit 4c41db2

Please sign in to comment.