Git Product home page Git Product logo

mkoeppe / cypari Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 3-manifolds/cypari

0.0 1.0 0.0 20.23 MB

CyPari is a Python3 extension module for Windows, macOS and linux. The user interface, and most of the underlying code, is the same for CyPari as for Sage's cypari2 module, but CyPari is completely self-contained.

Shell 0.64% Python 16.97% C 12.07% Makefile 0.35% Cython 69.97%

cypari's Introduction

CyPari

CyPari is a standalone version of Sage's pari module which is largely consistent with the Sage cypari2 package that it inspired, but which can be distributed in binary form as a pip wheel and also works on Windows. In particular, CyPari uses the automated build scripts written by Jeroen DeMeyer for cypari2. Currently it uses Pari 2.15. The fact that the build process continues to work with each new release of PARI is a strong validation of Jeroen's flexible build scheme.

CyPari handles critical signals such as SIGSEGV when sent from within a sig_on - sig_off block. Long computations in sig_on - sig_off blocks are interruptable with a SIGINT. This feature work on Windows as well as linux and macOS.

Because CyPari is intended to be distributed in binary form as a pip wheel some changes are needed in the overall design compared to that used in Sage. First it embeds the relevant parts of the cysignals module, since cysignals is not distributable as a wheel. Second, it is statically linked with the pari library so that it does not depend on or interfere with the user's PARI installation. Finally, it uses a single shared library for the extension module. This avoids sharing global variables across DLLs and avoids creating modules which are not useful by themselves.

The module ia built and installed by the following commands:

python3 setup.py build
python3 -m pip install .

To run doctests use:

python setup.py test

All tests should pass on all platforms.

To clean up the build area (but not remove PARI) use:

python setup.py clean

For building on Windows we expect an msys64 system with the UCRT64 environment installed. For building the extension module we expect Microsoft Visual Studio 2022 with the 10.0.22000.0 SDK installed, as well as the Universal CRT SDK. The build process uses the mingw UCRT64 toolchain to build libpari.a and libgmp.a but the Python extension is built with MSVC.

Currently we support 64 bit Python 3.6 - 3.12 on linux, macOS and Windows.

cypari's People

Contributors

culler avatar nathandunfield avatar unhyperbolic avatar slel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.