Skip to content

Add check for Arch Linux in configure to recommend meson build #40155

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

Merged
merged 3 commits into from
Jun 1, 2025

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented May 24, 2025

Add a check if the configure is run on Arch Linux. If yes, then recommend to use Meson instead since there is little need for configure + make on Arch and the Meson build works nicely there.
This check can be disabled by passing --disable-meson-check.

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

@tobiasdiez
Copy link
Contributor Author

@antonio-rojas Not sure when it's the best time to merge this. If I understood you correctly, you are planning to switch the next release to the meson build, right? If so, then adding a check like this before the next release is probably a good idea so that devs are using the same building system as the official arch package.

@antonio-rojas
Copy link
Contributor

@antonio-rojas Not sure when it's the best time to merge this. If I understood you correctly, you are planning to switch the next release to the meson build, right? If so, then adding a check like this before the next release is probably a good idea so that devs are using the same building system as the official arch package.

Yes, this should be fine to merge any time now, but the docs would probably need some updates. The pip install method will not work on Arch with system python, since we implement PEP 668. The recommended way to install foreign python packages on Arch is to use a virtual environment.

I also noticed that the meson section of the installation guide mentions "You can run the tests with ./sage -t", which will not work with a meson install.

@tobiasdiez
Copy link
Contributor Author

@antonio-rojas Not sure when it's the best time to merge this. If I understood you correctly, you are planning to switch the next release to the meson build, right? If so, then adding a check like this before the next release is probably a good idea so that devs are using the same building system as the official arch package.

Yes, this should be fine to merge any time now, but the docs would probably need some updates.

Awesome! Thanks a lot, I'm very grateful for your support to bring Meson to the production-ready stage.

The pip install method will not work on Arch with system python, since we implement PEP 668. The recommended way to install foreign python packages on Arch is to use a virtual environment.

#40124 improves the meson install instructions. If you follow those, you would have either a conda or uv-generated venv. Do you think this suffices, or should we clarify that an installation in the system env is usually not recommended/possible?

I also noticed that the meson section of the installation guide mentions "You can run the tests with ./sage -t", which will not work with a meson install.

It actually works because of the dot, which invokes the sage script in the root. But I agree, if you want to test the installation from a different directory, you would need to call the doctest module directly.

vbraun pushed a commit to vbraun/sage that referenced this pull request May 28, 2025
sagemathgh-40155: Add check for Arch Linux in configure to recommend meson build
    
<!-- ^ 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". -->

Add a check if the configure is run on Arch Linux. If yes, then
recommend to use Meson instead since there is little need for configure
+ make on Arch and the Meson build works nicely there.
This check can be disabled by passing `--disable-meson-check`.

### 📝 Checklist

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

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40155
Reported by: Tobias Diez
Reviewer(s):
@vbraun vbraun merged commit edbe69d into sagemath:develop Jun 1, 2025
19 of 27 checks passed
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.

3 participants