Skip to content
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

build/pkgs/meson: Update to 1.3.1, require >= 1.2.3 for Python 3.12 support, reject meson installed in inaccessible user schemes #37319

Merged
merged 7 commits into from
Feb 29, 2024

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Feb 13, 2024

As reported in https://groups.google.com/g/sage-devel/c/9ETciH8efTE/m/UfUO7xmsAQAJ, our configure script currently accepts "system" meson that will not be functional in our venv.

$ pip install --user meson
Collecting meson
  Using cached meson-1.3.1-py3-none-any.whl.metadata (1.8 kB)
Using cached meson-1.3.1-py3-none-any.whl (976 kB)
Installing collected packages: meson
Successfully installed meson-1.3.1
$ python3 -c 'import sysconfig; print(sysconfig.get_path("scripts", "posix_user"))'
/Users/mkoeppe/Library/Python/3.11/bin
$ /Users/mkoeppe/Library/Python/3.11/bin/meson --version
1.3.1
$ ./sage -sh -c '/Users/mkoeppe/Library/Python/3.11/bin/meson --version'
Traceback (most recent call last):
  File "/Users/mkoeppe/Library/Python/3.11/bin/meson", line 5, in <module>
    from mesonbuild.mesonmain import main
ModuleNotFoundError: No module named 'mesonbuild'

Also tightening the version requirement. Only needed for Python 3.12 support (https://github.com/mesonbuild/meson-python/blob/main/pyproject.toml#L36), but we do this unconditionally for simplicity.

Also updating meson to latest and changing to a wheel package.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • 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

@mkoeppe mkoeppe changed the title build/pkgs/meson: Update to 1.3.1, require >= 1.2.3 for Python 3.12 support build/pkgs/meson: Update to 1.3.1, require >= 1.2.3 for Python 3.12 support, reject meson installed in inaccessible user schemes Feb 13, 2024
@mkoeppe mkoeppe self-assigned this Feb 13, 2024
@mkoeppe mkoeppe added this to the sage-10.3 milestone Feb 20, 2024
@tobiasdiez
Copy link
Contributor

Removing blocker as there are problems with other PRs, see #37428 for more details.

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 23, 2024

Restoring "blocker" -- this PR needs to go into the stable release.
Same comment as #37351 (comment) -- #37428 has absolutely no details, mass removal of the "blocker" label on 9 PRs is not OK.

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 25, 2024

Thanks, Volker.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 26, 2024
….3 for Python 3.12 support, reject meson installed in inaccessible user schemes

    
<!-- ^^^^^
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 -->

As reported in https://groups.google.com/g/sage-
devel/c/9ETciH8efTE/m/UfUO7xmsAQAJ, our `configure` script currently
accepts "system" meson that will not be functional in our venv.
```
$ pip install --user meson
Collecting meson
  Using cached meson-1.3.1-py3-none-any.whl.metadata (1.8 kB)
Using cached meson-1.3.1-py3-none-any.whl (976 kB)
Installing collected packages: meson
Successfully installed meson-1.3.1
$ python3 -c 'import sysconfig; print(sysconfig.get_path("scripts",
"posix_user"))'
/Users/mkoeppe/Library/Python/3.11/bin
$ /Users/mkoeppe/Library/Python/3.11/bin/meson --version
1.3.1
$ ./sage -sh -c '/Users/mkoeppe/Library/Python/3.11/bin/meson --version'
Traceback (most recent call last):
  File "/Users/mkoeppe/Library/Python/3.11/bin/meson", line 5, in
<module>
    from mesonbuild.mesonmain import main
ModuleNotFoundError: No module named 'mesonbuild'
```

Also tightening the version requirement. Only needed for Python 3.12
support (https://github.com/mesonbuild/meson-
python/blob/main/pyproject.toml#L36), but we do this unconditionally for
simplicity.

Also updating meson to latest and changing to a wheel package.

<!-- 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#37319
Reported by: Matthias Köppe
Reviewer(s):
Copy link

Documentation preview for this PR (built with commit 3212ffe; changes) is ready! 🎉

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 28, 2024

Same is also needed for cmake @ComboProblem

@vbraun vbraun merged commit 65a64ea into sagemath:develop Feb 29, 2024
15 of 36 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 2, 2024
…ccessible user schemes

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

These two are installable via binary wheels on PyPI.
When they are installed with `pip install --user`, as appears to be
becoming more popular, then our `configure` script will see them, but
they will not work within the Sage environment because we set
PYTHONUSERBASE.

Fix as done previously for `meson` in sagemath#37319.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- Depends on sagemath#37319 (merged here)

URL: sagemath#37504
Reported by: Matthias Köppe
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 4, 2024
…ccessible user schemes

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

These two are installable via binary wheels on PyPI.
When they are installed with `pip install --user`, as appears to be
becoming more popular, then our `configure` script will see them, but
they will not work within the Sage environment because we set
PYTHONUSERBASE.

Fix as done previously for `meson` in sagemath#37319.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- Depends on sagemath#37319 (merged here)

URL: sagemath#37504
Reported by: Matthias Köppe
Reviewer(s):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants