Commit 0efff58b authored by Frederic HAN's avatar Frederic HAN
Browse files

0.5.3 use cythonize in setup.py

parent 103d925c
......@@ -367,3 +367,5 @@ Changelog
+ remove __init__.py (gives pb with cython 0.22.p5)
- 0.5.2:
+ add giac keywords. (ex: eliminate ...)
- 0.5.3:
+ use cythonize in setup.py for recent cython.
VERSION=0.5.2
VERSION=0.5.3
mkdir src
git clone -l ./ src
rm -rf src/.git
......
#!/usr/bin/env python
# Set this to True to enable building extensions using Cython.
# Set it to False to build extensions from the CPP file (that
# was previously created using Cython).
# Set it to 'auto' to build with Cython if available, otherwise
# from the CPP file.
# Warning: I can notice some runtime errors with cython 0.15 that disappear with 0.17
#USE_CYTHON = False
USE_CYTHON = 'auto'
from sage.env import SAGE_LOCAL,SAGE_SRC
import os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
if USE_CYTHON:
try:
from Cython.Distutils import build_ext
except ImportError:
if USE_CYTHON=='auto':
USE_CYTHON=False
else:
raise
cmdclass = { }
ext_modules = [ ]
conf = {'CXXFLAGS' : [], 'LDFLAGS' : []}
......@@ -51,9 +32,11 @@ except ImportError:
###
include_dirs=sage_include_directories()
include_path=include_dirs
ext_modules=[]
if USE_CYTHON:
ext_modules+=[Extension(
ext_modules+=cythonize([Extension(
"giacpy", # name of extension
["giacpy.pyx"], # our Cython source
libraries=libraries,
......@@ -61,31 +44,22 @@ if USE_CYTHON:
include_dirs=include_dirs,
extra_compile_args=conf["CXXFLAGS"],
extra_link_args=conf["LDFLAGS"],
language="c++")]
cmdclass={'build_ext': build_ext}
language="c++")], include_path=include_path
)
#cmdclass={'build_ext': build_ext}
else:
ext_modules+=[Extension(
"giacpy", # name of extension
["giacpy.cpp"], # the cpp file already created by Cython
library_dirs=library_dirs,
libraries=libraries,
include_dirs=include_dirs,
extra_compile_args=conf["CXXFLAGS"],
extra_link_args=conf["LDFLAGS"],
language="c++")]
setup(
name='giacpy',
version='0.5.2',
version='0.5.3',
description='A Cython frontend to the c++ library giac. (Computer Algebra System)',
author='Frederic Han',
author_email="frederic.han@imj-prg.fr",
url='http://www.math.jussieu.fr/~han/xcas/giacpy/',
url='http://webusers.imj-prg.fr/~frederic.han/xcas/giacpy/',
long_description=open('README.txt').read(),
license='GPLv2 or above',
ext_modules=ext_modules,
cmdclass=cmdclass
ext_modules=ext_modules
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment