Skip to content

merge cypari and cypari2 #19

@videlec

Description

@videlec

The original cypari written by N. Dunfield and M. Culler will be merged with this project to ease maintenance. Though we are facing several incompatibilities

1 - Windows

cypari can be installed on Windows (however not directly from source, they provide wheels on PyPI). This is at the cost of a fork of cysignals and many special casing.

  • cysignals is not working on windows. See issue 63.
  • issues with long (cypari defines a new pari_ulongword type)

Note that these issues refer to plain Windows. Under cygwin, there are no such issues.

2 - Static vs dynamic linking / source vs distribution

cypari currently ships gmp, pari and (a fork of) cysignals. cypari2 contains only sources for a Python module. The original cypari has the advantage of being installable on many platforms using wheels (among other it solves the problem of having cysignals built after libpari).

We propose in the merged version to have three possible ways of installation

  1. pip install cypari: installs a wheel with static linking and embedded cysignals (i.e. what is currently available with the cypari wheels)

  2. pip install --no-binary cypari: installs from an sdist with dynamic linking from gmp/pari on the system and dependency from cysignals (i.e. the cypari2 version)

  3. (optional) pip install --no-binary --install-option=static-link cypari: installs from an sdist but also builds libpari.a and libgmp.a and statically links against them (intermediate solution)

4 - Cython macro

Cython macros (either defined using DEF or via compile_time_env option of cythonize) modifies the C code generated by Cython from the pyx files. Having many of them imposes to provide a different versions of the generated C files for each possible values of the constants (in order to allow to build from source without Cython).

The Python2/Python3 compatibility can be achieved without any of them (as done in cypari2, see #13). However it seems unavoidable for the Windows port.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions