Skip to content

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Aug 14, 2025

This PR migrates cypari2 from the legacy setuptools build system to the modern meson-python backend. Hopefully, this fixes already some build issues on some platforms. It should also pave the way for a windows version.

Initial version was created by Github's copilot.

Copilot AI and others added 6 commits August 13, 2025 03:26
Co-authored-by: tobiasdiez <5037600+tobiasdiez@users.noreply.github.com>
Co-authored-by: tobiasdiez <5037600+tobiasdiez@users.noreply.github.com>
Co-authored-by: tobiasdiez <5037600+tobiasdiez@users.noreply.github.com>
@tobiasdiez tobiasdiez force-pushed the copilot/fix-3964b91e-9f2a-4559-822d-031eb0fb710f branch from 8901850 to 3815f81 Compare August 14, 2025 13:47
@tobiasdiez tobiasdiez requested a review from dimpase August 15, 2025 09:15
@tobiasdiez
Copy link
Contributor Author

There are still failing CI runs, but those were also failing for other PRs. So this should be good to go.

@tobiasdiez
Copy link
Contributor Author

cc a few people that might be interested in this: @dimpase @antonio-rojas @tornaria @orlitzky

meson.build Outdated
['c', 'cython'],
version: files('VERSION'),
license: 'GPL v3',
default_options: ['c_std=c17', 'cpp_std=c++17', 'python.install_env=auto'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is c++ used anywhere?

meson.build Outdated
project('cypari2',
['c', 'cython'],
version: files('VERSION'),
license: 'GPL v3',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license doesn't match pyproject.toml

sources: pyx,
subdir: 'cypari2',
install: true,
#include_directories: [inc_dirs, 'cypari2'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left-over comment?

@tobiasdiez
Copy link
Contributor Author

Thanks @orlitzky, you were right in all points! Should be fixed now.

Copy link
Member

@dimpase dimpase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you say a bit in the docs about pari as the dependency. It's a bit fragile as there is no version check, and it's unclear what to do if libpari is in a nonstandard location.

It would be interesting to figure out how to build wheels which don't pack libpari in (do the current binary wheels get libpari packed in?)

README.rst Outdated
>>> pari.centerlift(pari.lift(fq))
[x - t, 1; x + (t^2 + t - 1), 1; x + (-t^2 - 1), 1]

The complete documentation of cypari2 is available at http://cypari2.readthedocs.io and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http -> https, please (also below)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tobiasdiez
Copy link
Contributor Author

can you say a bit in the docs about pari as the dependency. It's a bit fragile as there is no version check

Do you know what versions are acceptable? I have no idea ;-)

and it's unclear what to do if libpari is in a nonstandard location.

Will do. Pari really needs a pkg-config file ;-)

https://peps.python.org/pep-0639/

Fixes issues like:
SyntaxWarning: invalid escape sequence '\['
        verb_loop = re.compile("^(    .*)@\[[a-z]*\]", re.MULTILINE)
      /root/.cache/uv/builds-v0/.tmp70O2Lb/lib/python3.13/site-packages/setupto
ols/config/_apply_pyprojecttoml.py:82:
      SetuptoolsDeprecationWarning: `project.license` as a TOML table is
      deprecated

(that's for setuptools, but meson-python should throw a similar error at some point)
it should be at least 0.18 to allow license in the format of the PR
@dimpase dimpase merged commit 058cd28 into sagemath:master Aug 24, 2025
4 of 6 checks passed
@dimpase
Copy link
Member

dimpase commented Aug 24, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants