Changeset 2525
- Timestamp:
- 05/16/12 09:23:15 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r2518 r2525 32 32 opts.AddVariables( 33 33 ("extraroot", "Addition tree to look for packages", None), 34 ("extraflags", "Additional build flags", None), 34 35 ("FORTRAN", "The fortran compiler", None), 35 36 ("f2clib", "The fortran to c library", None), … … 212 213 if conf.env["alma"]: 213 214 conf.env.Append(CPPFLAGS=['-DUSE_CASAPY']) 215 if conf.env.get("extraflags"): 216 flags = conf.env.ParseFlags(conf.env["extraflags"]) 217 conf.env.MergeFlags(flags) 214 218 env = conf.Finish() 215 219 -
trunk/setup.py
r2517 r2525 1 import glob 2 try: 3 from setuptools import setup 4 except ImportError, ex: 5 from distutils.core import setup 6 from distutils.core import Extension 7 from scons_ext import scons_ext 8 from distutils import ccompiler 1 from setup_ext import setup 9 2 10 3 PKGNAME = "asap" 11 asapso = Extension(name="%s._%s" % (PKGNAME, PKGNAME), sources=[])12 4 13 5 setup(name = PKGNAME, … … 27 19 install_requires = ["ipython>=0.11", "matplotlib>=0.99", "numpy>=1.3"], 28 20 # setup_requires = [ "scons>=1.0" ], 29 ext_modules =[ asapso ],30 cmdclass={'build_ext': scons_ext}31 32 21 ) -
trunk/setup_ext/__init__.py
r2517 r2525 1 1 import os, sys, platform 2 2 import subprocess 3 import glob 3 4 import shutil 4 5 from distutils.command import build_ext 6 7 try: 8 from setuptools import setup as _setup 9 from setuptools import Extension 10 except ImportError, ex: 11 from distutils.core import setup as _setup 12 from distutils.core import Extension 13 14 def setup(*args, **kwargs): 15 asapso = Extension(name="%s._%s".format(kwargs['name'],kwargs['name']), 16 sources=[]) 17 d = {'ext_modules': [ asapso ], 18 'cmdclass': {'build_ext': scons_ext} 19 } 20 kwargs.update(d) 21 print kwargs 22 _setup(*args, **kwargs) 23 5 24 6 25 class scons_ext(build_ext.build_ext): … … 28 47 ('f2clib=', None, 'Name of the fortran-to-c library'), 29 48 ('jobs=','j', 'Number of processes'), 49 ('extraflags=', None, 50 'Extra build flags e.g. static libs, defines etc.'), 30 51 ('extraroot=', None, 31 52 'Extra root directory where muiltple packages could be found,' … … 44 65 self.jobs = None 45 66 self.extraroot = None 67 self.extraflags = None 46 68 self.casacoreroot = None 47 69 self.casacorestatic = None
Note:
See TracChangeset
for help on using the changeset viewer.