sagemath / cypari2

Python interface to the number theory library PARI/GP. Source repository for https://pypi.org/project/cypari2/
https://cypari2.readthedocs.io/en/latest/
GNU General Public License v2.0
30 stars 28 forks source link

Add pyproject.toml, update installation instructions for modern Python packaging, fix docbuild, update CI scripts, add Cython 3 support #139

Closed mkoeppe closed 1 year ago

mkoeppe commented 1 year ago

This PR started out with minimal changes, replacing the outdated use of setup_requires.

Fixes #93 (with a cleaner solution for augmenting the build-time path than the stalled PR #104).

dimpase commented 1 year ago

@videlec - what is the status of cypari2 vs Cython 3? You probably noticed that Sage has moved to Cython 3 (and it works)

dimpase commented 1 year ago

@mkoeppe - can you add https://github.com/sagemath/sage/blob/develop/build/pkgs/cypari/patches/cython3-legacy.patch and drop the <3 constraint on Cython version added in c473052 ?

PS. OK, I've done it myself

videlec commented 1 year ago

I think the workflow should include both Cython>=3 and Cython<3.

dimpase commented 1 year ago

I think the workflow should include both Cython>=3 and Cython<3.

This would be a bigger change than this PR. A new issue?

dimpase commented 1 year ago

@mkoeppe - what this ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none) stuff mean? I have no clue.

dimpase commented 1 year ago

Does make build run an isolated Python environment, so that the previously run pip install has no effect? I don't understand.

dimpase commented 1 year ago

@mkoeppe - it doesn't fly. make build does not want to accept system-wide installed setuptools. full stop.

dimpase commented 1 year ago

OK, we finally get a working build and testing, doc building is broken:

Running Sphinx v7.2.6
WARNING: Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English).
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 7 source files that are out of date
updating environment: [new config] 7 added, 0 changed, 0 removed

Exception occurred:
  File "/home/runner/work/cypari2/cypari2/tvenv/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 108, in role
    title = caption % part
            ~~~~~~~~^~~~~~
TypeError: not all arguments converted during string formatting
The full traceback has been saved in /tmp/sphinx-err-dpid6l08.log, if you want to report the issue to the developers.
dimpase commented 1 year ago

this is due to broken format strings in extlinks in docs/source/conf.py. fixing...

dimpase commented 1 year ago

OK, builds/ytests/docs with Pari 2.15.4 pass, ones with Pari 2.11 and 2.13 take much more time, no idea why.

mkoeppe commented 1 year ago

Let's get rid of make build. This makes no sense any more.

mkoeppe commented 1 year ago

All done, please merge