mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-22 04:13:33 +01:00
Cython
Version:1.2.8
This commit is contained in:
parent
f6eb72c068
commit
ac5f474fed
5
src/Makefile
Normal file
5
src/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
default: $(wildcard %.py)
|
||||||
|
./cython_setup.py build_ext --inplace
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm *.c *.so *.pyc 2>/dev/null
|
26
src/cython_setup.py
Executable file
26
src/cython_setup.py
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
from distutils.core import setup
|
||||||
|
from distutils.extension import Extension
|
||||||
|
from Cython.Distutils import build_ext
|
||||||
|
import os
|
||||||
|
|
||||||
|
to_remove = """cython_setup.py command_line.py irpf90.py""".split()
|
||||||
|
ext_modules = []
|
||||||
|
|
||||||
|
files = os.listdir('.')
|
||||||
|
for file in to_remove:
|
||||||
|
files.remove(file)
|
||||||
|
|
||||||
|
for file in files:
|
||||||
|
if file.endswith(".py"):
|
||||||
|
module = file.split('.')[0]
|
||||||
|
ext_modules += [ Extension(module,[file]) ]
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name = 'IRPF90 extensions',
|
||||||
|
cmdclass = {'build_ext': build_ext},
|
||||||
|
ext_modules = ext_modules
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -303,7 +303,6 @@ def build_sub_needs():
|
|||||||
if sub is not None:
|
if sub is not None:
|
||||||
if type(line) == Declaration:
|
if type(line) == Declaration:
|
||||||
sub._to_provide += vars
|
sub._to_provide += vars
|
||||||
else:
|
|
||||||
sub._needs += vars
|
sub._needs += vars
|
||||||
|
|
||||||
build_sub_needs()
|
build_sub_needs()
|
||||||
@ -534,9 +533,10 @@ parsed_text = perform_loop_substitutions()
|
|||||||
######################################################################
|
######################################################################
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
for i in range(len(parsed_text)):
|
for i in range(len(parsed_text)):
|
||||||
if parsed_text[i][0] == 'ao_oneD.irp.f':
|
if parsed_text[i][0] == sys.argv[1]:
|
||||||
print '!-------- %s -----------'%(parsed_text[i][0])
|
print '!-------- %s -----------'%(parsed_text[i][0])
|
||||||
for line in parsed_text[i][1]:
|
for line in parsed_text[i][1]:
|
||||||
print line[1]
|
print line[1]
|
||||||
print line[0], line[1].filename
|
print line[0], line[1].filename
|
||||||
|
for i in subroutines:
|
||||||
|
print i, subroutines[i].needs, subroutines[i].to_provide
|
||||||
|
@ -1 +1 @@
|
|||||||
version = "1.2.7"
|
version = "1.2.8"
|
||||||
|
Loading…
Reference in New Issue
Block a user