From 57c194d745e105236246758c3556f221cf40785a Mon Sep 17 00:00:00 2001 From: Jan Caron <caron@fz-juelich.de> Date: Tue, 7 May 2013 17:12:00 +0200 Subject: [PATCH] Deleting the SCons file (Build via Distutils from now on) --- SCons/SConstruct | 25 ------------- SCons/SConstructCython | 22 ------------ SCons/SConstructCythonBACKUP | 70 ------------------------------------ 3 files changed, 117 deletions(-) delete mode 100644 SCons/SConstruct delete mode 100644 SCons/SConstructCython delete mode 100644 SCons/SConstructCythonBACKUP diff --git a/SCons/SConstruct b/SCons/SConstruct deleted file mode 100644 index 2b285f9..0000000 --- a/SCons/SConstruct +++ /dev/null @@ -1,25 +0,0 @@ -import os -import distutils.sysconfig -import sys - -PYTHON_LIBPATH = distutils.sysconfig.get_python_lib() -PYTHON_INCPATH = distutils.sysconfig.get_python_inc() -PYTHON_LIBRARY = "python" + sys.version[:3] - -print 'PYTHON_LIBPATH: ' + PYTHON_LIBPATH -print 'PYTHON_INCPATH: ' + PYTHON_INCPATH -print 'PYTHON_LIBRARY: ' + PYTHON_LIBRARY - -env = Environment(ENV = os.environ) - -if ARGUMENTS.get('VERBOSE') != '1': - env['CCCOMSTR'] = "Compiling $TARGET" - env['LINKCOMSTR'] = "Linking $TARGET" - -Progress('$TARGET\r', overwrite=True) - -env.AppendUnique(LIBPATH=[PYTHON_LIBPATH], CPPPATH=[PYTHON_INCPATH]) - -env.Program('hello', 'hellotest.c', CPPPATH='.') - -env.Decider('MD5-timestamp') \ No newline at end of file diff --git a/SCons/SConstructCython b/SCons/SConstructCython deleted file mode 100644 index 7f4fe34..0000000 --- a/SCons/SConstructCython +++ /dev/null @@ -1,22 +0,0 @@ -import distutils.sysconfig -import os -import sys - -PYTHON_LIBPATH = distutils.sysconfig.get_python_lib() -PYTHON_INCPATH = distutils.sysconfig.get_python_inc() -PYTHON_LIBRARY = "python" + sys.version[:3] - -CythonBuilder = Builder(action ='cython $SOURCE', - suffix = '.c', - src_suffix = '.pyx') - -def PydBuilder(env,source): - cCode = env.Py2C(source) - env.SharedLibrary(target='karl.pyd', source=cCode, LIBPREFIX='') - -env = Environment(ENV = os.environ, - BUILDERS = {'Py2C':CythonBuilder}) - -env.AddMethod(CythonBuilder,'Cython') - -env.Cython('c1') \ No newline at end of file diff --git a/SCons/SConstructCythonBACKUP b/SCons/SConstructCythonBACKUP deleted file mode 100644 index 58a920c..0000000 --- a/SCons/SConstructCythonBACKUP +++ /dev/null @@ -1,70 +0,0 @@ -import distutils.sysconfig -import os -import sys - -PYTHON_LIBPATH = distutils.sysconfig.get_python_lib() -PYTHON_INCPATH = distutils.sysconfig.get_python_inc() -PYTHON_LIBRARY = "python" + sys.version[:3] - -print 'PYTHON_LIBPATH: ' + PYTHON_LIBPATH -print 'PYTHON_INCPATH: ' + PYTHON_INCPATH -print 'PYTHON_LIBRARY: ' + PYTHON_LIBRARY - -env = Environment(ENV = os.environ) - -env.AppendUnique(LIBPATH=[PYTHON_LIBPATH], CPPPATH=[PYTHON_INCPATH]) - -if ARGUMENTS.get('VERBOSE') != '1': - env['CCCOMSTR'] = "Compiling $TARGET" - env['LINKCOMSTR'] = "Linking $TARGET" - -Progress('$TARGET\r', overwrite=True) - -env.Decider('MD5-timestamp') - - - - - - - - - - - -# This builder takes the cython source code and generates c code. -cythonBuilder = Builder(action ='cython $SOURCE', - suffix = '.c', - src_suffix = '.pyx') - -# Setup the compilation environment. -env = Environment(PYEXT_USE_DISTUTILS=True, - ENV = os.environ, - tools=['mingw'], - BUILDERS={'Py2C':cythonBuilder}, - CCFLAGS='-LC:\Python27\libs -IC:\Python27\include', - LINKFLAGS='-lpython2.7 -shared -o $SOURCE') - -# Method that calls routines neccessary to create shared library. -def cythonPseudoBuilder(env,source): - cCode = env.Py2C(source) - #env.SharedLibrary(source,cCode,LIBPREFIX='') - -env.AddMethod(cythonPseudoBuilder,'Cython') - -env.Cython('c1') - -#env.SharedLibrary('c1.pyd', ['c1.c']) - - -c1_module = env.LoadableModule('c1.pyd', ['c1.c']) - - - - -#import setup - -#for ext in setup.get_extensions(): -# print e.sources[:] - -#env.Command('hello.pyd', '', 'python setup.py build_ext --compiler=mingw32 --inplace') \ No newline at end of file -- GitLab