Revert #32713 (Apply "configure --enable-editable" to other packages) for sage-conf, sage-setup
mkoeppe opened this issue · 24 comments
(from #32713 comment:11)
Users need the wheel of sage-conf when creating venvs. And we need the wheels of packages sage-conf and sage-setup when testing distributions using ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e python-sagewheels-nopypi)' and similar - as documented in the developer's guide as of #32899.
Until editable wheels (PEP 660) are implemented in setuptools (or we switch the distributions to another build system that implements PEP 660 such as flit), we revert the change made in #32713 for these packages.
But we keep sage-docbuild editable.
CC: @tobiasdiez @kwankyu
Component: build
Branch/Commit: public/build/trac_editable @ 2a30209
Issue created by migration from https://trac.sagemath.org/ticket/32913
Description changed:
---
+++
@@ -1,6 +1,6 @@
(from [#32713 comment:11](https://github.com/sagemath/sage/issues/32713#comment:11))
-Users need the wheel of **sage-conf** when creating venvs. And we need the wheels of packages when testing distributions using `./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e python-sagewheels-nopypi)'` and similar.
+Users need the wheel of **sage-conf** when creating venvs. And we need the wheels of packages **sage-conf** and **sage-setup** when testing distributions using `./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e python-sagewheels-nopypi)'` and similar.
Until editable wheels (PEP 660) are implemented in **setuptools** (or we switch the distributions to another build system that implements PEP 660 such as **flit**), we revert the change made in #32713 for these packages.
New commits:
2cc0497 | build/pkgs/{sage_conf,sage_setup}/install: Do not use sdh_pip_editable_install |
Can you please expand on why this leads to problems? For example, end-users should normally not use an editable install anyway, neither should the build process for the wheels on ci. For the tox cmd, wouldn't be better if the tox config of sagemath-standard only applies the -e only to that package if that's the desired behavior.
I would fine it confusing if make --enable-editable-install installs some packages in editable mode and others not.
Replying to @tobiasdiez:
For the tox cmd, wouldn't be better if the tox config of sagemath-standard only applies the -e only to that package if that's the desired behavior.
Please take a look at pkgs/sagemath-standard/tox.ini, then you'll see what it does...
Replying to @tobiasdiez:
I would fine it confusing if
configure --enable-editableinstalls some packages in editable mode and others not.
Hasn't confused anyone so far...
Also note that configure --help explains:
--enable-editable use an editable install of the Sage library
Description changed:
---
+++
@@ -1,6 +1,6 @@
(from [#32713 comment:11](https://github.com/sagemath/sage/issues/32713#comment:11))
-Users need the wheel of **sage-conf** when creating venvs. And we need the wheels of packages **sage-conf** and **sage-setup** when testing distributions using `./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e python-sagewheels-nopypi)'` and similar.
+Users need the wheel of **sage-conf** when creating venvs. And we need the wheels of packages **sage-conf** and **sage-setup** when testing distributions using `./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e python-sagewheels-nopypi)'` and similar - as documented in the developer's guide as of #32899.
Until editable wheels (PEP 660) are implemented in **setuptools** (or we switch the distributions to another build system that implements PEP 660 such as **flit**), we revert the change made in #32713 for these packages.
Sorry, but I still don't understand why you need to build and use wheels for sage packages if all of them use editable installs. Why can one not install them (as editable) in the tox environments?
For example, something along the following lines (in src/tox):
[testenv]
usedevelop=True # Instruct tox to use editable install of main sagemath package
deps=
--editable=file:///{toxinidir}/../path/to/sage_conf # Install sage-conf as editable install
Potentially combined with a custom install_command that invokes pip with find-links to discover the wheels of other dependencies that are build during make.
That could be implemented but it is not implemented.
And the installation procedure would also be more difficult to document than just to say "install all wheels from ...".
Replying to @mkoeppe:
That could be implemented but it is not implemented.
I would strongly prefer that over reverting something that works in principle. I'll have a look the coming days and create a prototype.
Any progress on this?
With the new branch public/build/trac_editable you can run tox -e py38 (or 39) from the src folder and get a tox environment with editable installs of sagemath-standard and sage-conf. Some of the tests are failing (because gap and blas are not using sage-conf but determine stuff at runtime during env variables) and there might be a more elegant way to set the env variables but as a prototype this should suffice.
New commits:
2a30209 | Add tox env with editable installs |
This branch doesn't fix what is described in the ticket description
Maybe not (as I said above in comment 4 I don't quite get what your problem is). But it shows how to use editable installs with tox and thus provides a way around the problem "we need the wheels of packages sage-conf and sage-setup when testing distributions [with tox]". Also it was meant as a prototype not as a complete solution.
Well we are in the release phase for Sage 9.5 and can't merge "prototypes"
Set milestone to sage-9.6 after Sage 9.5 release.
Changed author from Matthias Koeppe to none