Skip to content

Commit eae1720

Browse files
committed
Add __FLINT_VERSION__ and __FLINT_RELEASE__
1 parent c5077ae commit eae1720

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

src/flint/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@
3333
from .types.dirichlet import *
3434
from .functions.showgood import good, showgood
3535

36+
from .flint_base.flint_base import (
37+
FLINT_VERSION as __FLINT_VERSION__,
38+
FLINT_RELEASE as __FLINT_RELEASE__,
39+
)
40+
3641
__version__ = '0.6.0'

src/flint/flint_base/flint_base.pyx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
from flint.flintlib.flint cimport FLINT_BITS as _FLINT_BITS
1+
from flint.flintlib.flint cimport (
2+
FLINT_BITS as _FLINT_BITS,
3+
FLINT_VERSION as _FLINT_VERSION,
4+
__FLINT_RELEASE as _FLINT_RELEASE,
5+
)
26
from flint.flint_base.flint_context cimport thectx
37

48

9+
FLINT_BITS = _FLINT_BITS
10+
FLINT_VERSION = _FLINT_VERSION.decode("ascii")
11+
FLINT_RELEASE = _FLINT_RELEASE
12+
13+
514
cdef class flint_elem:
615
def __repr__(self):
716
if thectx.pretty:

src/flint/flintlib/flint.pxd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ cdef extern from "flint/fmpz.h":
3737
ctypedef slong fmpz_struct
3838

3939
cdef extern from "flint/flint.h":
40+
const char * FLINT_VERSION
41+
const int __FLINT_RELEASE
4042
const int FLINT_BITS
4143
ctypedef void * flint_rand_t
4244
void flint_randinit(flint_rand_t state)

0 commit comments

Comments
 (0)