Use system python packages with --enable-system-site-packages#36141
Use system python packages with --enable-system-site-packages#36141vbraun merged 253 commits intosagemath:developfrom
Conversation
…nfigure. This new option is experimental and disabled by default. When it is enabled, the string "--system-site-packages" is appended to a new environment variable SAGE_VENV_FLAGS that is then passed to the sage-venv command during the build using autoconf substitution. Thusly the correct setting finds its way into local/pyvenv.cfg.
This new macro encapsulates the check for system installations of python packages. It uses setuptools.version's pkg_resources to check if the contents of install-requires.txt are satisfied for the given package; and if not, tells the build system to install the SPKG instead.
This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because those C dependencies wind up linked into shared libraries like, /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so that could potentially conflict with (for example) the glpk SPKG.
This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds up linked into shared libraries like, /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so that potentially conflict with the zeromq SPKG.
This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack wind up linked into shared libraries like, /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so that potentially conflict with the openblas SPKG.
This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack wind up linked into shared libraries like, /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so that potentially conflict with the openblas SPKG.
This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],... because those dependencies wind up linked into shared libraries like, /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so that potentially conflict with their SPKG counterparts.
One nit: despite what the GNU sed man page says, |
|
I had to check, but there is an ABI guarantee for python, so we should be OK rebuilding everything only when python's minor version changes. |
Sure, that would work too and is of course more elegant |
|
On Fri, Sep 01, 2023 at 02:44:02PM -0700, Matthias Köppe wrote:
> Would `cut -f2 -d.` work as well to parse the python minor version?
Sure, that would work too and is of course more elegant
it's a Python bug that the minor version is not available from
pkg-config, IMHO
|
Use the "cut" utility to parse the python minor version component instead of sed -E. Despite what the GNU sed manpage says, the "-E" flag does not actually appear in any version of POSIX, while "cut" does. The cut version is also a bit more readable.
At least Anyway, I pushed the |
|
merge conflict with #36112 |
|
Merged #36112 |
|
debian-bullseye (https://github.com/mkoeppe/sage/actions/runs/6054949711/job/16433159643#logs) |
|
Documentation preview for this PR (built with commit de831a5; changes) is ready! 🎉 |
|
fedora-33: |
|
https://docs.fedoraproject.org/en-US/releases/lifecycle/
Fedora 36 and earlier are past EOL.
Let's not waste time on them.
…On 2 September 2023 05:23:48 EEST, "Matthias Köppe" ***@***.***> wrote:
fedora-33:
```
pkg_resources.ContextualVersionConflict: (sphinxcontrib-htmlhelp 1.0.3 (/usr/lib/python3.9/site-packages), Requirement.parse('sphinxcontrib-htmlhelp>=2.0.0'), {'sphinx'})
```
--
Reply to this email directly or view it on GitHub:
#36141 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
|
Once more I'll explain that old Fedora is proxy for RHEL. |
|
We are not married to RHEL, and a proxy is just a proxy. It is very broken. To Hell with RHEL, if they are not willing to provide any useful CI. |
sagemathgh-36141: Use system python packages with --enable-system-site-packages Rebased branch of sagemath#29665 Platform-specific testing: - for example TARGETS_PRE="build-local" tox -e docker-ubuntu-focal- standard-sitepackages -- build ptest Fixes sagemath#29665 URL: sagemath#36141 Reported by: Michael Orlitzky Reviewer(s): Dima Pasechnik, Matthias Köppe, Michael Orlitzky
sagemathgh-36141: Use system python packages with --enable-system-site-packages Rebased branch of sagemath#29665 Platform-specific testing: - for example TARGETS_PRE="build-local" tox -e docker-ubuntu-focal- standard-sitepackages -- build ptest Fixes sagemath#29665 URL: sagemath#36141 Reported by: Michael Orlitzky Reviewer(s): Dima Pasechnik, Matthias Köppe, Michael Orlitzky
sagemathgh-36218: src/bin/sage-env: set PYDEVD_DISABLE_FILE_VALIDATION=1 This fixes a doctest with newer versions of debugpy, as seen in in sagemath#36141 and sagemath#36129. Explanation in the commit message. URL: sagemath#36218 Reported by: Michael Orlitzky Reviewer(s): Matthias Köppe
sagemathgh-36218: src/bin/sage-env: set PYDEVD_DISABLE_FILE_VALIDATION=1 This fixes a doctest with newer versions of debugpy, as seen in in sagemath#36141 and sagemath#36129. Explanation in the commit message. URL: sagemath#36218 Reported by: Michael Orlitzky Reviewer(s): Matthias Köppe
sagemathgh-36218: src/bin/sage-env: set PYDEVD_DISABLE_FILE_VALIDATION=1 This fixes a doctest with newer versions of debugpy, as seen in in sagemath#36141 and sagemath#36129. Explanation in the commit message. URL: sagemath#36218 Reported by: Michael Orlitzky Reviewer(s): Matthias Köppe
sagemathgh-36240: Fix Python package metadata generated by `bootstrap` <!-- ^^^^^ 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 --> <!-- Why is this change required? What problem does it solve? --> After sagemath#36141, pyproject.toml and setup.cfg files are no longer generated correctly. <!-- 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. - [ ] 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#36240 Reported by: Matthias Köppe Reviewer(s): Michael Orlitzky
sagemathgh-36405: `bootstrap-conda`: Refactor, generate versioned environment files <!-- ^^^^^ 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 --> - Environment files are now versioned with the Python minor version, as proposed in (and cherry-picked from) sagemath#35986 by @tobiasdiez - CI for conda now uses `--enable-system-site-packages` from sagemath#36141 by @orlitzky Split out from <!-- 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. - [ ] 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#36405 Reported by: Matthias Köppe Reviewer(s): Tobias Diez
Rebased branch of #29665
Platform-specific testing:
Fixes #29665