Skip to content

Commit

Permalink
Some changes to the Linux build scripts.
Browse files Browse the repository at this point in the history
The PyDAS.dassl extension module now links with the DASSL object files rather
than the static library. This should help make installation on Windows easier.

Fixed the header comment in the setup.py script; it inadvertently referred to
RMG instead of PyDAS.
  • Loading branch information
jwallen committed Dec 29, 2010
1 parent 500a900 commit f257016
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 29 deletions.
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
#
################################################################################

include make.inc
-include make.inc

all: DASSL DASPK DASKR cython

cython:
python setup.py build_ext $(CYTHON_FLAGS)

install:
python setup.py install

DASSL:
$(MAKE) -C dassl F77=$(F77)

Expand All @@ -20,12 +23,16 @@ DASPK:
DASKR:
$(MAKE) -C daskr F77=$(F77)

clean:
python setup.py clean $(CLEAN_FLAGS)
clean: clean-DASSL clean-DASPK clean-DASKR clean-cython

clean-DASSL:
$(MAKE) -C dassl clean

clean-DASPK:
$(MAKE) -C daspk clean

clean-DASKR:
$(MAKE) -C daskr clean
rm -f PyDAS/*.so PyDAS/*.pyc

clean-cython:
python setup.py clean $(CLEAN_FLAGS)
Expand Down
3 changes: 3 additions & 0 deletions make.inc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
F77=gfortran

CYTHON_FLAGS=--inplace
56 changes: 31 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

################################################################################
#
# RMG - Reaction Mechanism Generator
# PyDAS - A Python wrapper to several differential algebraic system solvers
#
# Copyright (c) 2010 by Joshua W. Allen ([email protected])
#
Expand All @@ -30,28 +30,34 @@
import numpy

if __name__ == '__main__':

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

# Turn on HTML annotation file generation (useful for
import Cython.Compiler.Options
Cython.Compiler.Options.annotate = True

# The Cython modules to setup
ext_modules = [
Extension('PyDAS.dassl', ['PyDAS/dassl.pyx'], include_dirs=['PyDAS', numpy.get_include()], library_dirs=['dassl'], libraries=['gfortran', 'ddassl']),
]

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

# Turn on HTML annotation file generation
import Cython.Compiler.Options
Cython.Compiler.Options.annotate = True

# The Cython extension modules to compile
ext_modules = [
Extension(
'PyDAS.dassl',
['PyDAS/dassl.pyx'],
include_dirs=['PyDAS', numpy.get_include()],
libraries=['gfortran'],
extra_objects=['dassl/daux.o','dassl/ddassl.o','dassl/dlinpk.o'],
),
]

# Run the setup command
setup(name='PyDAS',
version='0.1.0',
description='A Python wrapper to several differential algebraic system solvers',
author='Joshua W. Allen',
author_email='[email protected]',
url='',
packages=['PyDAS'],
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)
# Run the setup command
setup(name='PyDAS',
version='0.1.0',
description='A Python wrapper to several differential algebraic system solvers',
author='Joshua W. Allen',
author_email='[email protected]',
url='http://github.com/jwallen/PyDAS',
packages=['PyDAS'],
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)

0 comments on commit f257016

Please sign in to comment.