-
-
Notifications
You must be signed in to change notification settings - Fork 665
Description
Pynac has a compile-time dependency on the Python library but is not installed using Python package infrastructure. This is problematic because Python users cannot install it using standard Python tools - for example for testing different Python versions.
Pynac has no other uses than as the core of the symbolic expressions facility of Sage; and cannot even be tested without Sage.
We merge Pynac (i.e., the directory https://github.com/pynac/pynac/tree/master/ginac) into the Sage library as src/sage/symbolic/ginac
. It is not a very big package - one flat directory with 100 *.h and *.cpp files, a total of 50kLOC. (The existing !Python/Cython symbolics code in sage.symbolic
, sage.calculus
, sage.functions
is about 60kLOC.)
The Pynac sources are compiled like other C++ sources that are already in the Sage source tree. They are linked into a single Python extension module, sage.symbolic.expression
. All other extension modules that used to link to pynac (sage.libs.pynac.pynac
, sage.symbolic.function
, sage.symbolic.series
etc.) are
- either refactored so that they only
import
helper functions provided bysage.symbolic.expression
instead of having tocimport
Pynac functions directly (see sage.symbolic.ring: Remove direct use of cimports from pynac #32391, sage.symbolic.function: Remove direct use of cimports from pynac #32407) - or merged into the extension module
sage.symbolic.expression
(via Cythoninclude
statements, not by copy-paste of source code, to keep the diff small)
This solves the same issues that #30534 tried to address, which ran into unresolved technical difficulties.
It will also make it easier for Sage developers to make changes to Pynac and the related symbolic implementation.
Follow-up: #32387 Remove pynac spkg
Depends on #32391
Depends on #32407
Depends on #32461
CC: @kliem @kiwifb @antonio-rojas @DaveWitteMorris @slel @dimpase @tscrim @egourgoulhon @nbruin
Component: symbolics
Author: Matthias Koeppe, Jonathan Kliem
Branch: 0d0b58f
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/32386