Commit ac54ea4b authored by François Fortin's avatar François Fortin
Browse files

*remove the lib directory

*make adjustment to the script using the lib directory.

*make_package:
- now strip the .svn directory instead of the CVS one
- tarball is now stored in the parent of the svn root directory.

*setup.sh
- clearer message for the selftest after install 
parent 51a373e0
......@@ -74,11 +74,11 @@ echo "C compilation"
gcc -c macadam.c macadam_wrap.c $PYTHON_INC
echo "Fortran compilation"
g77 -Wall -Wimplicit -Wsurprising -W -c lib_gen.f grille.f array2matrix.f initial.f coupla.f lib_therm.f flxsurfz.f balanc.f constPhys.f
gfortran -Wall -Wimplicit -Wsurprising -W -c lib_gen.f grille.f array2matrix.f initial.f coupla.f lib_therm.f flxsurfz.f balanc.f constPhys.f
echo "Link"
g77 -shared macadam.o macadam_wrap.o lib_gen.o grille.o array2matrix.o initial.o coupla.o lib_therm.o flxsurfz.o balanc.o constPhys.o -lc -o _macadam.so
gfortran -shared macadam.o macadam_wrap.o lib_gen.o grille.o array2matrix.o initial.o coupla.o lib_therm.o flxsurfz.o balanc.o constPhys.o -lc -o _macadam.so
echo "Copying .so in ../frontend/model"
......
......@@ -190,6 +190,7 @@ sMetro_dir = "metro-" + sVersion_number
lPath = string.split(sys.path[0],"/")
sRoot_path = string.join(lPath[:-2],"/")
sMetro_real_dir = string.join(lPath[:-1],"/")
sPackage_path = string.join(lPath[:-4],"/")
if not os.path.isdir(sRoot_path + "/" + sMetro_dir):
print "Wrong METRo directory name. The version of METRo extract from the" +\
......@@ -214,14 +215,14 @@ shutil.copy2( sRoot_path + "/" + sMetro_dir + "/scripts/setup.sh",
sRoot_path + "/" + sMetro_dir + "/")
# copy model binary to lib
shutil.copy2( sRoot_path + "/" + sMetro_dir + "/src/frontend/model/_macadam.so",
sRoot_path + "/" + sMetro_dir + "/lib")
sRoot_path + "/" + sMetro_dir + "/src/model/_macadam.so.prebuilt")
shutil.copy2( sRoot_path + "/" + sMetro_dir + "/src/frontend/model/macadam.py",
sRoot_path + "/" + sMetro_dir + "/lib")
sRoot_path + "/" + sMetro_dir + "/src/model/macadam.py.prebuilt")
sPackage_list = sPackage_list + sMetro_dir + "/setup.sh "
# make tarball
sCommand = "tar cjvf metro-" + sVersion_number + ".tar.bz2 --exclude CVS -C " +\
sCommand = "tar cjvf " + sPackage_path + "/metro-" + sVersion_number + ".tar.bz2 --exclude .svn -C " +\
sRoot_path + " " + sPackage_list
print 'Executing', sCommand
os.system(sCommand)
......@@ -231,7 +232,7 @@ print "* Cleanup *"
print "remove '%s'" % (sRoot_path + "/" + sMetro_dir + "/setup.sh")
os.remove(sRoot_path + "/" + sMetro_dir + "/setup.sh")
print "remove '%s'" % (sRoot_path + "/" + sMetro_dir + "/lib/_macadam.so")
os.remove(sRoot_path + "/" + sMetro_dir + "/lib/_macadam.so")
print "remove '%s'" % (sRoot_path + "/" + sMetro_dir + "/lib/macadam.py")
os.remove(sRoot_path + "/" + sMetro_dir + "/lib/macadam.py")
#print "remove '%s'" % (sRoot_path + "/" + sMetro_dir + "/lib/_macadam.so")
#os.remove(sRoot_path + "/" + sMetro_dir + "/lib/_macadam.so")
#print "remove '%s'" % (sRoot_path + "/" + sMetro_dir + "/lib/macadam.py")
#os.remove(sRoot_path + "/" + sMetro_dir + "/lib/macadam.py")
......@@ -135,8 +135,8 @@ else
mkdir $installation_dir/src/frontend/model
fi
touch $installation_dir/src/frontend/model/__init__.py
cp $installation_dir/lib/_macadam.so $installation_dir/src/frontend/model
cp $installation_dir/lib/macadam.py $installation_dir/src/frontend/model
cp $installation_dir/src/model/_macadam.so.prebuilt $installation_dir/src/frontend/model/_macadam.so
cp $installation_dir/src/model/macadam.py.prebuilt $installation_dir/src/frontend/model/macadam.py
fi
echo ""
......@@ -151,8 +151,8 @@ cp -r src/frontend $destination_path/bin
echo "* Copying METRo data exemples to: "$destination_path/data
cp -r data $destination_path/
echo "* Copying METRo external lib to: "$destination_path/bin/external_lib/
cp lib/* $destination_path/bin/external_lib/
#echo "* Copying METRo external lib to: "$destination_path/bin/external_lib/
#cp lib/* $destination_path/bin/external_lib/
echo "* Copying METRo documentation to: "$destination_path/doc
cp -r doc $destination_path/
......@@ -169,8 +169,14 @@ echo "METRo successfully installed in '$destination_path'"
echo "---------------------------------------------------"
echo ""
echo "* Installation done *"
echo ""
echo "To test the installation of METRo"
echo " go in directory $destination_path/bin/ and try the command 'python metro --selftest'"
echo "Compare the files ../data/roadcast/roadcast_selftest.xml and"
echo " ../data/roadcast/roadcast_selftest_reference.xml. They should be identical."
echo "---------------------------------"
echo "Go into the METRo directory:"
echo " 'cd $destination_path/bin/'"
echo "Launch METRo selftest:"
echo " 'python metro --selftest'"
echo "Compare the files:"
echo " 'diff ../data/roadcast/roadcast_selftest.xml ../data/roadcast/roadcast_selftest_reference.xml'"
echo "They should be identical except for the production-date."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment