[sagemath] 01/04: Add Snarks pruner scripts.
Tobias Hansen
thansen at moszumanska.debian.org
Thu Feb 5 00:31:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sagemath.
commit b3fc35f8536ef7c30aff11dbb5bcffb8f3fa8d15
Author: Tobias Hansen <tobias.han at gmx.de>
Date: Wed Feb 4 23:23:54 2015 +0100
Add Snarks pruner scripts.
---
debian/pruner/Makefile | 5 +
debian/pruner/configure.ac | 480 ++++++++++++++++++++++++++++++++++++++
debian/pruner/m4/python_module.m4 | 61 +++++
debian/pruner/pruner.py.in | 138 +++++++++++
4 files changed, 684 insertions(+)
diff --git a/debian/pruner/Makefile b/debian/pruner/Makefile
new file mode 100644
index 0000000..36cde53
--- /dev/null
+++ b/debian/pruner/Makefile
@@ -0,0 +1,5 @@
+all:
+ aclocal -I m4 && autoconf && ./configure
+
+clean:
+ rm -rf pruner.py autom4te.cache aclocal.m4 config.log config.status configure
diff --git a/debian/pruner/configure.ac b/debian/pruner/configure.ac
new file mode 100644
index 0000000..26d51cf
--- /dev/null
+++ b/debian/pruner/configure.ac
@@ -0,0 +1,480 @@
+AC_INIT()
+
+AC_ARG_WITH([sage-root],
+ [ --with-sage-root=<path> path to where sage is unpacked],
+ [SAGE_ROOT="$withval"],
+ [SAGE_ROOT="/home/jpuydt/sage-exp"])
+AC_SUBST(SAGE_ROOT)
+
+PKG_PROG_PKG_CONFIG
+
+AC_CHECK_HEADER(atlas/clapack.h, HAS_ATLAS="True", HAS_ATLAS="False")
+AC_SUBST(HAS_ATLAS)
+
+AC_CHECK_HEADER(gc.h, HAS_BOEHM_GC="True", HAS_BOEHM_GC="False")
+AC_SUBST(HAS_BOEHM_GC)
+
+# FIXME(boost): only needed for polybori, hence not needed
+HAS_BOOST="True"
+AC_SUBST(HAS_BOOST)
+
+AC_CHECK_PROG(HAS_BZIP2, bzip2, "True", "False")
+AC_SUBST(HAS_BZIP2)
+
+# FIXME(cddlib): sage's is heavily patched, so use their version...
+HAS_CDDLIB="False"
+AC_SUBST(HAS_CDDLIB)
+
+# FIXME(cephes): we shouldn't need it
+HAS_CEPHES="True"
+AC_SUBST(HAS_CEPHES)
+
+AC_CHECK_HEADER(cliquer/cliquer.h, HAS_CLIQUER="True", HAS_CLIQUER="False")
+AC_SUBST(HAS_CLIQUER)
+
+AC_CHECK_FILE(/usr/share/sagemath/combinatorial_designs/MOLS_table.txt, HAS_COMBINATORIAL_DESIGNS="True", HAS_COMBINATORIAL_DESIGNS="False")
+AC_SUBST(HAS_COMBINATORIAL_DESIGNS)
+
+AC_CHECK_FILE(/usr/share/sagemath/conway_polynomials/conway_polynomials.sobj, HAS_CONWAY_POLYNOMIALS="True", HAS_CONWAY_POLYNOMIALS="False")
+AC_SUBST(HAS_CONWAY_POLYNOMIALS)
+
+AC_CHECK_PYTHON_MODULE(cvxopt)
+if test "x${PYTHON_cvxopt}" = "x1"; then
+ HAS_CVXOPT="True"
+else
+ HAS_CVXOPT="False"
+fi
+AC_SUBST(HAS_CVXOPT)
+
+AC_CHECK_PROG(HAS_CYTHON, cython, "True", "False")
+AC_SUBST(HAS_CYTHON)
+
+AC_CHECK_PYTHON_MODULE(dateutil)
+if test "x${PYTHON_dateutil}" = "x1"; then
+ HAS_DATEUTIL="True"
+else
+ HAS_DATEUTIL="False"
+fi
+AC_SUBST(HAS_DATEUTIL)
+
+AC_CHECK_PYTHON_MODULE(docutils)
+if test "x${PYTHON_docutils}" = "x1"; then
+ HAS_DOCUTILS="True"
+else
+ HAS_DOCUTILS="False"
+fi
+AC_SUBST(HAS_DOCUTILS)
+
+AC_CHECK_PROG(HAS_ECL, ecl, "True", "False")
+AC_SUBST(HAS_ECL)
+
+AC_LANG_PUSH([C++])
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="${old_CPPFLAGS} -DNTL_ALL"
+AC_CHECK_HEADER(eclib/curve.h, eclib_header=1, eclib_header=0)
+CPPFLAGS=$old_CPPFLAGS
+AC_LANG_POP([C++])
+AC_CHECK_PROG(eclib_tools, mwrank, 1, 0)
+if test "${eclib_header}${eclib_tools}" = "11"; then
+ HAS_ECLIB="True"
+else
+ HAS_ECLIB="False"
+fi
+AC_SUBST(HAS_ECLIB)
+
+AC_CHECK_PROG(HAS_ECM, ecm, "True", "False") # package gmp-ecm!
+AC_CHECK_HEADER(ecm.h, , HAS_ECM="False")
+AC_SUBST(HAS_ECM)
+
+AC_CHECK_FILE(/usr/share/sagemath/cremona/cremona_mini.db, HAS_ELLIPTIC_CURVES="True", HAS_ELLIPTIC_CURVES="False")
+AC_SUBST(HAS_ELLIPTIC_CURVES)
+
+AC_CHECK_PROG(HAS_FFLAS_FFPACK, fflas-ffpack-config, "True", "False")
+AC_SUBST(HAS_FFLAS_FFPACK)
+
+AC_CHECK_HEADER(flint/config.h, HAS_FLINT="True", HAS_FLINT="False")
+AC_SUBST(HAS_FLINT)
+
+AC_CHECK_PROG(HAS_FLINTQS, QuadraticSieve, "True", "False")
+AC_SUBST(HAS_FLINTQS)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADER(fplll/fplll.h, HAS_FPLLL="True", HAS_FPLLL="False")
+AC_LANG_POP([C++])
+AC_SUBST(HAS_FPLLL)
+
+AC_CHECK_PROG(HAS_FREETYPE, freetype-config, "True", "False")
+AC_SUBST(HAS_FREETYPE)
+
+AC_CHECK_FILE(/usr/include/gap/gap.h, HAS_GAP="True", HAS_GAP="False")
+AC_SUBST(HAS_GAP)
+
+AC_CHECK_HEADER(gd.h, HAS_GD="True", HAS_GD="False")
+AC_SUBST(HAS_GD)
+
+AC_CHECK_PYTHON_MODULE(gd)
+if test "x${PYTHON_gd}" = "x1"; then
+ HAS_GDMODULE="True"
+else
+ HAS_GDMODULE="False"
+fi
+AC_SUBST(HAS_GDMODULE)
+
+AC_CHECK_HEADER(gf2x.h, HAS_GF2X="True", HAS_GF2X="False")
+AC_SUBST(HAS_GF2X)
+
+AC_CHECK_PROG(HAS_GFAN, gfan, "True", "False")
+AC_SUBST(HAS_GFAN)
+
+AC_CHECK_PROG(HAS_GFORTRAN, gfortran, "True", "False")
+AC_SUBST(HAS_GFORTRAN)
+
+AC_CHECK_PROG(HAS_GIT, git, "True", "False")
+AC_SUBST(HAS_GIT)
+
+AC_CHECK_HEADER(givaro-config.h, HAS_GIVARO="True", HAS_GIVARO="False")
+AC_SUBST(HAS_GIVARO)
+
+AC_CHECK_HEADER(glpk.h, HAS_GLPK="True", HAS_GLPK="False")
+AC_SUBST(HAS_GLPK)
+
+AC_CHECK_FILE(/usr/share/sagemath/graphs/graphs.db, HAS_GRAPHS="True", HAS_GRAPHS="False")
+AC_SUBST(HAS_GRAPHS)
+
+AC_CHECK_PROG(HAS_GSL, gsl-config, "True", "False")
+AC_SUBST(HAS_GSL)
+
+# FIXME(iconv): unneeded on glibc platforms as far as I know
+HAS_ICONV="True"
+AC_SUBST(HAS_ICONV)
+
+AC_CHECK_HEADER(iml.h, HAS_IML="True", HAS_IML="False", [#include "gmp.h"])
+AC_SUBST(HAS_IML)
+
+AC_CHECK_PROG(HAS_IPYTHON, ipython, "True", "False")
+AC_SUBST(HAS_IPYTHON)
+
+AC_CHECK_PYTHON_MODULE(jinja2)
+if test "x${PYTHON_jinja2}" = "x1"; then
+ HAS_JINJA2="True"
+else
+ HAS_JINJA2="False"
+fi
+AC_SUBST(HAS_JINJA2)
+
+# FIXME(jmol): debian is too late, use sage's
+HAS_JMOL="False"
+AC_SUBST(HAS_JMOL)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADER(Lfunction/L.h, HAS_LCALC="True", HAS_LCALC="False")
+AC_LANG_POP([C++])
+AC_SUBST(HAS_LCALC)
+
+# FIXME(libgap): shouldn't exist, but does: use sage's
+HAS_LIBGAP="False"
+AC_SUBST(HAS_LIBGAP)
+
+AC_CHECK_PROG(HAS_LIBPNG, libpng-config, "True", "False")
+AC_SUBST(HAS_LIBPNG)
+
+AC_CHECK_PROG(HAS_LINBOX_CONFIG, linbox-config, "1", "0")
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADER(linbox/linbox-sage.h, HAS_LINBOX_SAGE="1", HAS_LINBOX_SAGE="0", [#include "gmp.h"])
+AC_LANG_POP([C++])
+if test "x${HAS_LINBOX_SAGE}${HAS_LINBOX_CONFIG}" = "x11"; then
+ HAS_LINBOX="True"
+else
+ HAS_LINBOX="False"
+fi
+
+AC_SUBST(HAS_LINBOX)
+
+AC_CHECK_HEADER(lrcalc/list.h, HAS_LRCALC="True", HAS_LRCALC="False")
+AC_SUBST(HAS_LRCALC)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADERS(m4ri/m4ri.h, HAS_M4RI="True", HAS_M4RI="False")
+AC_LANG_POP([C++])
+AC_SUBST(HAS_M4RI)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADERS(m4rie/m4rie.h, HAS_M4RIE="True", HAS_M4RIE="False")
+AC_LANG_POP([C++])
+AC_SUBST(HAS_M4RIE)
+
+AC_CHECK_PYTHON_MODULE(matplotlib)
+if test "x${PYTHON_matplotlib}" = "x1"; then
+ HAS_MATPLOTLIB="True"
+else
+ HAS_MATPLOTLIB="False"
+fi
+AC_SUBST(HAS_MATPLOTLIB)
+
+# FIXME(maxima): needs quite special instructions to get it going
+HAS_MAXIMA="True"
+AC_CHECK_FILE(/usr/share/doc/maxima-share/copyright, , HAS_MAXIMA="False")
+AC_CHECK_FILE(/usr/share/doc/maxima-doc/copyright, , HAS_MAXIMA="False")
+AC_CHECK_FILE(/usr/share/doc/maxima/copyright, , HAS_MAXIMA="False")
+AC_SUBST(HAS_MAXIMA)
+
+AC_CHECK_HEADERS(mpc.h, HAS_MPC="True", HAS_MPC="False")
+AC_SUBST(HAS_MPC)
+
+AC_CHECK_HEADERS(mpfi.h, HAS_MPFI="True", HAS_MPFI="False")
+AC_SUBST(HAS_MPFI)
+
+AC_CHECK_HEADERS(mpfr.h, HAS_MPFR="True", HAS_MPFR="False")
+AC_SUBST(HAS_MPFR)
+
+# FIXME(mpir): debian wants to avoid using it, not needed as far as I can tell
+HAS_MPIR="True"
+AC_SUBST(HAS_MPIR)
+
+AC_CHECK_PYTHON_MODULE(mpmath)
+if test "x${PYTHON_mpmath}" = "x1"; then
+ HAS_MPMATH="True"
+else
+ HAS_MPMATH="False"
+fi
+AC_SUBST(HAS_MPMATH)
+
+AC_CHECK_HEADERS(ncurses.h, HAS_NCURSES="True", HAS_NCURSES="False")
+AC_SUBST(HAS_NCURSES)
+
+AC_CHECK_PYTHON_MODULE(networkx)
+if test "x${PYTHON_networkx}" = "x1"; then
+ HAS_NETWORKX="True"
+else
+ HAS_NETWORKX="False"
+fi
+AC_SUBST(HAS_NETWORKX)
+
+AC_CHECK_HEADERS(NTL/version.h, HAS_NTL="True", HAS_NTL="False")
+AC_SUBST(HAS_NTL)
+
+AC_CHECK_PYTHON_MODULE(numpy)
+if test "x${PYTHON_numpy}" = "x1"; then
+ HAS_NUMPY="True"
+else
+ HAS_NUMPY="False"
+fi
+AC_SUBST(HAS_NUMPY)
+
+AC_CHECK_PROG(HAS_PALP, nef-5d.x, "True", "False")
+AC_SUBST(HAS_PALP)
+
+AC_CHECK_HEADER(pari/pari.h, HAS_PARI="True", HAS_PARI="False")
+AC_SUBST(HAS_PARI)
+
+AC_CHECK_FILE(/usr/share/pari/galdata/COS10_39_29, HAS_PARI_GALDATA="True", HAS_PARI_GALDATA="False")
+AC_SUBST(HAS_PARI_GALDATA)
+
+AC_CHECK_FILE(/usr/share/pari/seadata/sea313, HAS_PARI_SEADATA="True", HAS_PARI_SEADATA="False")
+AC_SUBST(HAS_PARI_SEADATA)
+
+AC_CHECK_PROG(HAS_PATCH, patch, "True", "False")
+AC_SUBST(HAS_PATCH)
+
+AC_CHECK_PYTHON_MODULE(pexpect)
+if test "x${PYTHON_pexpect}" = "x1"; then
+ HAS_PEXPECT="True"
+else
+ HAS_PEXPECT="False"
+fi
+AC_SUBST(HAS_PEXPECT)
+
+# FIXME(pkgconf): probably not needed, since we have pkg-config
+HAS_PKGCONF="True"
+AC_SUBST(HAS_PKGCONF)
+
+# FIXME(pkgconfig): probably not needed, since it's not used!
+HAS_PKGCONFIG="True"
+AC_SUBST(HAS_PKGCONFIG)
+
+AC_CHECK_PYTHON_MODULE(PIL)
+if test "x${PYTHON_PIL}" = "x1"; then
+ HAS_PIL="True"
+else
+ HAS_PIL="False"
+fi
+AC_SUBST(HAS_PIL)
+
+AC_CHECK_PROG(HAS_PIP, pip, "True", "False")
+AC_SUBST(HAS_PIP)
+
+# FIXME(polybori): bug #751098 explains how to make that work
+PKG_CHECK_MODULES(polybori, [polybori-0.8 polybori-groebner-0.8], [HAS_POLYBORI="True"], [HAS_POLYBORI="False"])
+AC_SUBST(HAS_POLYBORI)
+
+AC_CHECK_FILE(/usr/share/sagemath/reflexive_polytopes/reflexive_polytopes_2d, HAS_POLYTOPES="True", HAS_POLYTOPES="False")
+AC_SUBST(HAS_POLYTOPES)
+
+AC_CHECK_HEADERS(ppl_c.h, HAS_PPL="True", HAS_PPL="False")
+AC_SUBST(HAS_PPL)
+
+AC_CHECK_PYTHON_MODULE(Crypto)
+if test "x${PYTHON_Crypto}" = "x1"; then
+ HAS_PYCRYPTO="True"
+else
+ HAS_PYCRYPTO="False"
+fi
+AC_SUBST(HAS_PYCRYPTO)
+
+AC_CHECK_PYTHON_MODULE(pygments)
+if test "x${PYTHON_pygments}" = "x1"; then
+ HAS_PYGMENTS="True"
+else
+ HAS_PYGMENTS="False"
+fi
+AC_SUBST(HAS_PYGMENTS)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADER(pynac/version.h, HAS_PYNAC="True", HAS_PYNAC="False")
+AC_LANG_POP([C++])
+AC_SUBST(HAS_PYNAC)
+
+AC_CHECK_PYTHON_MODULE(pyparsing)
+if test "x${PYTHON_pyparsing}" = "x1"; then
+ HAS_PYPARSING="True"
+else
+ HAS_PYPARSING="False"
+fi
+AC_SUBST(HAS_PYPARSING)
+
+PKG_CHECK_MODULES(python, python-2.7, [HAS_PYTHON='True'], [HAS_PYTHON='False'])
+AC_SUBST(HAS_PYTHON)
+
+AC_CHECK_PYTHON_MODULE(zmq)
+if test "x${PYTHON_zmq}" = "x1"; then
+ HAS_PYZMQ="True"
+else
+ HAS_PYZMQ="False"
+fi
+AC_SUBST(HAS_PYZMQ)
+
+AC_CHECK_PROG(HAS_R, R, "True", "False")
+AC_SUBST(HAS_R)
+
+AC_CHECK_HEADERS(ratpoints.h, HAS_RATPOINTS="True", HAS_RATPOINTS="False")
+AC_SUBST(HAS_RATPOINTS)
+
+AC_CHECK_HEADERS(readline/readline.h, HAS_READLINE="True", HAS_READLINE="False")
+AC_SUBST(HAS_READLINE)
+
+AC_CHECK_PYTHON_MODULE(rpy2)
+if test "x${PYTHON_rpy2}" = "x1"; then
+ HAS_RPY2="True"
+else
+ HAS_RPY2="False"
+fi
+AC_SUBST(HAS_RPY2)
+
+AC_CHECK_PROG(HAS_RUBIKS, rubiks_cubex, "True", "False")
+AC_SUBST(HAS_RUBIKS)
+
+# FIXME(sagenb): doesn't work, but low priority
+AC_CHECK_PYTHON_MODULE(sagenb)
+if test "x${PYTHON_sagenb}" = "x1"; then
+ HAS_SAGENB="True"
+else
+ HAS_SAGENB="False"
+fi
+AC_SUBST(HAS_SAGENB)
+
+# FIXME(sagetex): doesn't install, but low priority
+HAS_SAGETEX="True"
+AC_SUBST(HAS_SAGETEX)
+
+AC_CHECK_PYTHON_MODULE(scipy)
+if test "x${PYTHON_scipy}" = "x1"; then
+ HAS_SCIPY="True"
+else
+ HAS_SCIPY="False"
+fi
+AC_SUBST(HAS_SCIPY)
+
+AC_CHECK_PROG(HAS_SCONS, scons, "True", "False")
+AC_SUBST(HAS_SCONS)
+
+AC_CHECK_PYTHON_MODULE(setuptools)
+if test "x${PYTHON_setuptools}" = "x1"; then
+ HAS_SETUPTOOLS="True"
+else
+ HAS_SETUPTOOLS="False"
+fi
+AC_SUBST(HAS_SETUPTOOLS)
+
+# FIXME(singular): using the debian-science repository
+AC_LANG_PUSH([C++])
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$old_CPPFLAGS -I/usr/include/factory"
+AC_CHECK_HEADERS(libsingular.h, HAS_SINGULAR="True", HAS_SINGULAR="False")
+CPPFLAGS=$old_CPPFLAGS
+AC_LANG_POP([C++])
+HAS_SINGULAR="False"
+AC_SUBST(HAS_SINGULAR)
+
+AC_CHECK_PYTHON_MODULE(six)
+if test "x${PYTHON_six}" = "x1"; then
+ HAS_SIX="True"
+else
+ HAS_SIX="False"
+fi
+AC_SUBST(HAS_SIX)
+
+AC_CHECK_PYTHON_MODULE(sphinx)
+if test "x${PYTHON_sphinx}" = "x1"; then
+ HAS_SPHINX="True"
+else
+ HAS_SPHINX="False"
+fi
+AC_SUBST(HAS_SPHINX)
+
+AC_CHECK_PYTHON_MODULE(sqlalchemy)
+if test "x${PYTHON_sqlalchemy}" = "x1"; then
+ HAS_SQLALCHEMY="True"
+else
+ HAS_SQLALCHEMY="False"
+fi
+AC_SUBST(HAS_SQLALCHEMY)
+
+AC_CHECK_HEADERS(sqlite3.h, HAS_SQLITE="True", HAS_SQLITE="False")
+AC_SUBST(HAS_SQLITE)
+
+AC_CHECK_HEADERS(symmetrica/def.h, HAS_SYMMETRICA="True", HAS_SYMMETRICA="False")
+AC_SUBST(HAS_SYMMETRICA)
+
+AC_CHECK_PROG(HAS_SYMPOW, sympow, "True", "False")
+AC_SUBST(HAS_SYMPOW)
+
+AC_CHECK_PYTHON_MODULE(sympy)
+if test "x${PYTHON_sympy}" = "x1"; then
+ HAS_SYMPY="True"
+else
+ HAS_SYMPY="False"
+fi
+AC_SUBST(HAS_SYMPY)
+
+AC_CHECK_PROG(HAS_TACHYON, tachyon, "True", "False")
+AC_SUBST(HAS_TACHYON)
+
+AC_CHECK_PYTHON_MODULE(tornado)
+if test "x${PYTHON_tornado}" = "x1"; then
+ HAS_TORNADO="True"
+else
+ HAS_TORNADO="False"
+fi
+AC_SUBST(HAS_TORNADO)
+
+# FIXME(zeromq): useful only for pyzmq
+HAS_ZEROMQ="True"
+AC_SUBST(HAS_ZEROMQ)
+
+AC_CHECK_HEADERS(zlib.h, HAS_ZLIB="True", HAS_ZLIB="False")
+AC_SUBST(HAS_ZLIB)
+
+AC_CHECK_HEADERS(zn_poly/zn_poly.h, HAS_ZNPOLY="True", HAS_ZNPOLY="False")
+AC_SUBST(HAS_ZNPOLY)
+
+AC_OUTPUT(pruner.py)
diff --git a/debian/pruner/m4/python_module.m4 b/debian/pruner/m4/python_module.m4
new file mode 100644
index 0000000..28b82dc
--- /dev/null
+++ b/debian/pruner/m4/python_module.m4
@@ -0,0 +1,61 @@
+# AC_CHECK_PYTHON_MODULE Autoconf macro, revision 0
+#
+# Copyright (C) 2008 Stephan Peijnik
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+#
+# Sources:
+# http://blog.sp.or.at/2008/08/31/autoconf-and-python-checking-for-modules/
+#
+
+AC_DEFUN([AC_CHECK_PYTHON_MODULE],[
+ # AC_CHECK_PYTHON_MODULE(MODULE_NAME [,VERSION_VARIABLE])
+
+ # the python module name
+ MODULE_NAME=$1
+ # the python variable that contains the module's version
+ # If this is not set the version will not be retrieved from the module.
+ # Example: __version__.
+ VERSION_VARIABLE=$1.$2
+
+ # check for the python binary defined in $PYTHON
+ # fall back to "python"
+ if test -z $PYTHON;
+ then
+ PYTHON="python"
+ fi
+
+ AC_MSG_CHECKING(for python module $MODULE_NAME)
+
+ if test -z "$2"
+ then
+ $PYTHON -c "import $MODULE_NAME" 2>/dev/null
+ if test $? -eq 0
+ then
+ eval PYTHON_${MODULE_NAME}=1
+ AC_MSG_RESULT(found)
+ else
+ eval PYTHON_${MODULE_NAME}=0
+ AC_MSG_RESULT(not found)
+ fi
+ AC_SUBST([PYTHON_]MODULE_NAME)
+ else
+ VERSION=`$PYTHON -c "import $MODULE_NAME; print $VERSION_VARIABLE" 2>/dev/null`
+ if test $? -eq 0
+ then
+ eval PYTHON_${MODULE_NAME}_VERSION=$VERSION
+ eval PYTHON_${MODULE_NAME}=1
+
+ AC_MSG_RESULT([found ($VERSION)])
+ else
+ eval PYTHON_${MODULE_NAME}=0
+ eval PYTHON_${MODULE_NAME}_VERSION=0
+
+ AC_MSG_RESULT(not found)
+ fi
+ AC_SUBST([PYTHON_]MODULE_NAME_VERSION)
+ AC_SUBST([PYTHON_]MODULE_NAME)
+ fi
+])
diff --git a/debian/pruner/pruner.py.in b/debian/pruner/pruner.py.in
new file mode 100644
index 0000000..560af50
--- /dev/null
+++ b/debian/pruner/pruner.py.in
@@ -0,0 +1,138 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+import os
+import codecs
+import subprocess
+
+system_installed_packages = 0
+installed_dir = '@SAGE_ROOT@/local/var/lib/sage/installed'
+
+def mkdir_if_needed(dirname):
+ if not os.path.exists(dirname):
+ os.makedirs(dirname)
+
+def declare_system(package):
+ global system_installed_packages
+ version = subprocess.check_output(['/bin/cat', '@SAGE_ROOT@/build/pkgs/{0:s}/package-version.txt'.format(package)]).decode().strip()
+ filename = '{0:s}/{1:s}-{2:s}'.format(installed_dir, package, version)
+ installed = codecs.open(filename, 'w')
+ installed.write ('system')
+ installed.close()
+ system_installed_packages += 1
+
+
+mkdir_if_needed (installed_dir)
+mkdir_if_needed ('@SAGE_ROOT@/local')
+mkdir_if_needed ('@SAGE_ROOT@/local/include')
+
+dico = {
+ 'atlas': @HAS_ATLAS@,
+ 'boehm_gc': @HAS_BOEHM_GC@,
+ 'boost_cropped': @HAS_BOOST@,
+ 'bzip2': @HAS_BZIP2@,
+ 'cddlib': @HAS_CDDLIB@,
+ 'cephes': @HAS_CEPHES@,
+ 'cliquer': @HAS_CLIQUER@,
+ 'combinatorial_designs': @HAS_COMBINATORIAL_DESIGNS@,
+ 'conway_polynomials': @HAS_CONWAY_POLYNOMIALS@,
+ 'cvxopt': @HAS_CVXOPT@,
+ 'cython': @HAS_CYTHON@,
+ 'dateutil': @HAS_DATEUTIL@,
+ 'docutils': @HAS_DOCUTILS@,
+ 'ecl': @HAS_ECL@,
+ 'eclib': @HAS_ECLIB@,
+ 'ecm': @HAS_ECM@,
+ 'elliptic_curves': @HAS_ELLIPTIC_CURVES@,
+ 'fflas_ffpack': @HAS_FFLAS_FFPACK@,
+ 'flint': @HAS_FLINT@,
+ 'flintqs': @HAS_FLINTQS@,
+ 'libfplll': @HAS_FPLLL@,
+ 'freetype': @HAS_FREETYPE@,
+ 'gap': @HAS_GAP@,
+ 'libgd': @HAS_GD@,
+ 'gdmodule': @HAS_GDMODULE@,
+ 'gf2x': @HAS_GF2X@,
+ 'gfan': @HAS_GFAN@,
+ 'gcc': @HAS_GFORTRAN@,
+ 'git': @HAS_GIT@,
+ 'givaro': @HAS_GIVARO@,
+ 'glpk': @HAS_GLPK@,
+ 'graphs': @HAS_GRAPHS@,
+ 'gsl': @HAS_GSL@,
+ 'iconv': @HAS_ICONV@,
+ 'iml': @HAS_IML@,
+ 'ipython': @HAS_IPYTHON@,
+ 'jinja2': @HAS_JINJA2@,
+ 'jmol': @HAS_JMOL@,
+ 'lcalc': @HAS_LCALC@,
+ 'libgap': @HAS_LIBGAP@,
+ 'libpng': @HAS_LIBPNG@,
+ 'linbox': @HAS_LINBOX@,
+ 'lrcalc': @HAS_LRCALC@,
+ 'm4ri': @HAS_M4RI@,
+ 'm4rie': @HAS_M4RIE@,
+ 'matplotlib': @HAS_MATPLOTLIB@,
+ 'maxima': @HAS_MAXIMA@,
+ 'mpc': @HAS_MPC@,
+ 'mpfi': @HAS_MPFI@,
+ 'mpfr': @HAS_MPFR@,
+ 'mpir': @HAS_MPIR@,
+ 'mpmath': @HAS_MPMATH@,
+ 'ncurses': @HAS_NCURSES@,
+ 'networkx': @HAS_NETWORKX@,
+ 'ntl': @HAS_NTL@,
+ 'numpy': @HAS_NUMPY@,
+ 'palp': @HAS_PALP@,
+ 'pari': @HAS_PARI@,
+ 'pari_galdata': @HAS_PARI_GALDATA@,
+ 'pari_seadata_small': @HAS_PARI_SEADATA@,
+ 'patch': @HAS_PATCH@,
+ 'pexpect': @HAS_PEXPECT@,
+ 'pillow': @HAS_PIL@,
+ 'pip': @HAS_PIP@,
+ 'pkgconf': @HAS_PKGCONF@,
+ 'pkgconfig': @HAS_PKGCONFIG@,
+ 'polybori': @HAS_POLYBORI@,
+ 'polytopes_db': @HAS_POLYTOPES@,
+ 'ppl': @HAS_PPL@,
+ 'pycrypto': @HAS_PYCRYPTO@,
+ 'pygments': @HAS_PYGMENTS@,
+ 'pynac': @HAS_PYNAC@,
+ 'pyparsing': @HAS_PYPARSING@,
+ 'python': @HAS_PYTHON@,
+ 'pyzmq': @HAS_PYZMQ@,
+ 'r': @HAS_R@,
+ 'ratpoints': @HAS_RATPOINTS@,
+ # those two go together afaik:
+ 'readline': @HAS_READLINE@,
+ 'termcap': @HAS_READLINE@,
+ 'rpy2': @HAS_RPY2@,
+ 'rubiks': @HAS_RUBIKS@,
+ 'sagenb': @HAS_SAGENB@,
+ 'sagetex': @HAS_SAGETEX@,
+ 'scipy': @HAS_SCIPY@,
+ 'scons': @HAS_SCONS@,
+ 'setuptools': @HAS_SETUPTOOLS@,
+ 'singular': @HAS_SINGULAR@,
+ 'six': @HAS_SIX@,
+ 'sphinx': @HAS_SPHINX@,
+ 'sqlalchemy': @HAS_SQLALCHEMY@,
+ 'sqlite': @HAS_SQLITE@,
+ 'symmetrica': @HAS_SYMMETRICA@,
+ 'sympow': @HAS_SYMPOW@,
+ 'sympy': @HAS_SYMPY@,
+ 'tachyon': @HAS_TACHYON@,
+ 'tornado': @HAS_TORNADO@,
+ 'zeromq': @HAS_ZEROMQ@,
+ 'zlib': @HAS_ZLIB@,
+ 'zn_poly': @HAS_ZNPOLY@
+}
+
+for key, val in dico.items():
+ if val:
+ declare_system(key)
+ else:
+ print ('{0:s} will not come from debian!'.format (key))
+
+print('{0:d} system packages will be used'.format(system_installed_packages))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list