1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/env python
# Handy cheat-sheet (specific to the x86_64 Linux systems on which I
# usually debug this):
#
# To build and test:
#
# ./setup.py build
#
# To build so as to debug the native-code spigot library inside
# Python:
#
# CFLAGS="-O0" ./setup.py build --debug
#
# To run a single test program using the spigot module straight from
# the build directory that setup.py created:
#
# ./testenv test.py
# ./testenv powbegin.py 2 100
#
# To set up your environment so that spigot-usnig programs can be run
# directly:
#
# eval $(./testenv)
# ./test.py # for example
from distutils.core import setup, Extension
setup(name="spigot",
version="1.0",
description="Exact real calculation by spigot algorithm",
author="Simon Tatham",
author_email="anakin@pobox.com",
packages=["spigot"],
package_dir={'spigot':'spig'},
ext_modules=[Extension("spigot.internal",
["pyspig.cpp",
"../spigot.cpp",
"../misc.cpp",
"../consts.cpp",
"../arithmetic.cpp",
"../sqrt.cpp",
"../unary.cpp",
"../monotone.cpp",
"../trig.cpp",
"../expr.cpp",
"../exp.cpp",
"../gamma.cpp",
"../io.cpp",
"../erf.cpp",
"../baseout.cpp",
"../lambertw.cpp",
"../algebraic.cpp",
"../enforce.cpp",
"../expint.cpp",
"../trigint.cpp",
"../zeta.cpp",
],
include_dirs=[".."],
libraries=["gmp"],
define_macros=[("HAVE_LIBGMP",None)],
)])
|