Skip to content

Commit 058cd28

Browse files
authored
Merge pull request #182 from tobiasdiez/copilot/fix-3964b91e-9f2a-4559-822d-031eb0fb710f
Migrate from setuptools to meson-python build backend
2 parents 344018d + 933cc14 commit 058cd28

21 files changed

+150
-136
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
needs: [dist]
119119

120120
env:
121-
# Ubuntu packages to install so that the project's "setup.py sdist" can succeed
121+
# Ubuntu packages to install so that building the sdist can succeed
122122
DIST_PREREQ: libpari-dev pari-doc libbz2-dev bzip2
123123
# Name of this project in the Sage distribution
124124
SPKG: cypari

.install-pari.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ if [ "$URLDIR" = "" ]; then
88
URLDIR=OLD/${PURE_VERSION%.*}
99
fi
1010

11-
PARI_URL="http://pari.math.u-bordeaux.fr/pub/pari/$URLDIR"
12-
PARI_URL1="http://pari.math.u-bordeaux.fr/pub/pari/unix"
13-
PARI_URL2="http://pari.math.u-bordeaux.fr/pub/pari/unstable"
11+
PARI_URL="https://pari.math.u-bordeaux.fr/pub/pari/$URLDIR"
12+
PARI_URL1="https://pari.math.u-bordeaux.fr/pub/pari/unix"
13+
PARI_URL2="https://pari.math.u-bordeaux.fr/pub/pari/unstable"
1414

1515
# Download PARI sources
1616
wget --no-verbose "$PARI_URL/$PARI_VERSION.tar.gz" -O pari.tgz || wget --no-verbose "$PARI_URL1/pari-$PARI_VERSION.tar.gz" -O pari.tgz || wget --no-verbose "$PARI_URL2/pari-$PARI_VERSION.tar.gz" -O pari.tgz

MANIFEST.in

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CyPari 2
55
:target: https://cypari2.readthedocs.io/en/latest/?badge=latest
66
:alt: Documentation Status
77

8-
A Python interface to the number theory library `PARI/GP <http://pari.math.u-bordeaux.fr/>`_.
8+
A Python interface to the number theory library `PARI/GP <https://pari.math.u-bordeaux.fr/>`_.
99

1010
Installation
1111
------------
@@ -42,14 +42,10 @@ From source with pip
4242

4343
Requirements:
4444

45-
- PARI/GP >= 2.9.4 (header files and library); see
45+
PARI/GP >= 2.9.4 (header files and library); see
4646
https://doc.sagemath.org/html/en/reference/spkg/pari#spkg-pari
4747
for availability in distributions (GNU/Linux, conda-forge, Homebrew, FreeBSD),
4848
or install from source.
49-
- Python >= 3.9
50-
- pip
51-
- `cysignals <https://pypi.python.org/pypi/cysignals/>`_ >= 1.11.3
52-
- Cython >= 3.0
5349

5450
Install cypari2 via the Python Package Index (PyPI) via
5551

@@ -136,13 +132,25 @@ same computations be done via
136132
>>> pari.centerlift(pari.lift(fq))
137133
[x - t, 1; x + (t^2 + t - 1), 1; x + (-t^2 - 1), 1]
138134

139-
The complete documentation of cypari2 is available at http://cypari2.readthedocs.io and
140-
the PARI/GP documentation at http://pari.math.u-bordeaux.fr/doc.html
135+
The complete documentation of cypari2 is available at https://cypari2.readthedocs.io and
136+
the PARI/GP documentation at https://pari.math.u-bordeaux.fr/doc.html
141137

142-
Contributing
143-
------------
138+
Contributing & Development
139+
--------------------------
144140

145141
CyPari 2 is maintained by the SageMath community.
146142

147143
Open issues or submit pull requests at https://github.com/sagemath/cypari2
148144
and join https://groups.google.com/group/sage-devel to discuss.
145+
146+
To get started with development, you can set up an environment using Conda
147+
as follows:
148+
149+
::
150+
$ conda create -n cypari2-dev python cython pari=*=*_pthread ninja meson-python cysignals c-compiler
151+
$ conda activate cypari2-dev
152+
153+
Afterwards, you can build and install the package in editable mode:
154+
155+
::
156+
$ pip install -e . --no-build-isolation

_custom_build_meta.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

autogen/args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# it under the terms of the GNU General Public License as published by
1010
# the Free Software Foundation, either version 2 of the License, or
1111
# (at your option) any later version.
12-
# http://www.gnu.org/licenses/
12+
# https://www.gnu.org/licenses/
1313
#*****************************************************************************
1414

1515
from __future__ import unicode_literals

autogen/parser.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@
99
# it under the terms of the GNU General Public License as published by
1010
# the Free Software Foundation, either version 2 of the License, or
1111
# (at your option) any later version.
12-
# http://www.gnu.org/licenses/
12+
# https://www.gnu.org/licenses/
1313
#*****************************************************************************
1414

1515
from __future__ import absolute_import, unicode_literals
1616

17-
import os, re, io
17+
import io
18+
import os
19+
import re
1820

1921
from .args import pari_arg_types
20-
from .ret import pari_ret_types
2122
from .paths import pari_share
23+
from .ret import pari_ret_types
2224

2325
paren_re = re.compile(r"[(](.*)[)]")
2426
argname_re = re.compile(r"[ {]*&?([A-Za-z_][A-Za-z0-9_]*)")

autogen/paths.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99
# it under the terms of the GNU General Public License as published by
1010
# the Free Software Foundation, either version 2 of the License, or
1111
# (at your option) any later version.
12-
# http://www.gnu.org/licenses/
12+
# https://www.gnu.org/licenses/
1313
#*****************************************************************************
1414

1515
from __future__ import absolute_import, unicode_literals
1616

1717
import os
1818
import shutil
19-
2019
from glob import glob
2120

22-
2321
gppath = shutil.which("gp")
2422

2523
if gppath is None:
@@ -43,7 +41,7 @@ def pari_share():
4341
"""
4442
if "PARI_SHARE" in os.environ:
4543
return os.environ["PARI_SHARE"]
46-
from subprocess import Popen, PIPE
44+
from subprocess import PIPE, Popen
4745
if not gppath:
4846
raise EnvironmentError("cannot find an installation of PARI/GP: make sure that the 'gp' program is in your $PATH")
4947
# Ignore GP_DATA_DIR environment variable

autogen/ret.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
# it under the terms of the GNU General Public License as published by
1010
# the Free Software Foundation, either version 2 of the License, or
1111
# (at your option) any later version.
12-
# http://www.gnu.org/licenses/
12+
# https://www.gnu.org/licenses/
1313
#*****************************************************************************
1414

1515
from __future__ import unicode_literals
1616

17+
1718
class PariReturn(object):
1819
"""
1920
This class represents the return value of a PARI call.

cypari2/convert.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ PARI integers are stored as an array of limbs of type ``pari_ulong``
1515
(GMP or native), this array is stored little-endian or big-endian.
1616
This is encapsulated in macros like ``int_W()``:
1717
see section 4.5.1 of the
18-
`PARI library manual <http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.7.0/libpari.pdf>`_.
18+
`PARI library manual <https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.7.0/libpari.pdf>`_.
1919
2020
Python integers of type ``int`` are just C longs. Python integers of
2121
type ``long`` are stored as a little-endian array of type ``digit``

0 commit comments

Comments
 (0)