Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
setup.build Class Reference
Inheritance diagram for setup.build:
Collaboration diagram for setup.build:

Public Member Functions

def run (self)
 

Detailed Description

Specialized Python source builder.

Definition at line 10 of file setup.py.

Member Function Documentation

def setup.build.run (   self)

Definition at line 12 of file setup.py.

12  def run(self):
13  call(["mkdir", "-p", "build"])
14  if call(["cmake", "-H.", "-Bbuild"]) != 0:
15  raise Exception("Could not run CMake configuration. Make sure CMake is installed !")
16  if call(["make", "-Cbuild", "_ccllib"]) != 0:
17  raise Exception("Could not build CCL")
18  # Finds the library under its different possible names
19  if os.path.exists("build/pyccl/_ccllib.so"):
20  call(["cp", "build/pyccl/_ccllib.so", "pyccl/"])
21  else:
22  raise Exception("Could not find wrapper shared library, compilation must have failed.")
23  if call(["cp", "build/pyccl/ccllib.py", "pyccl/"]) != 0:
24  raise Exception("Could not find python module, SWIG must have failed.")
25  call(["cp", "include/ccl_params.ini", "pyccl/"])
26 
27  # Copy files required by CLASS
28  if call(["cp","-r", "build/extern/share/class/bbn", "pyccl/"]) != 0:
29  raise Exception("Could not copy the CLASS BBN fikes, CLASS compilation must have failed.")
30  if call(["cp","-r", "build/extern/share/class/hyrec", "pyccl/"]) != 0:
31  raise Exception("Could not copy the CLASS BBN fikes, CLASS compilation must have failed.")
32 
33  _build.run(self)
34 
35 # read the contents of the README file
def run(self)
Definition: setup.py:12

The documentation for this class was generated from the following file: