From 0d9467cab94f4fc89fc650a92132bb659b20ac03 Mon Sep 17 00:00:00 2001 From: marcindulak Date: Jun 25 2013 14:22:59 +0000 Subject: Initial import (#976886). --- diff --git a/.gitignore b/.gitignore index e69de29..9e3cdc5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/python-ase-3.7.1.3184.tar.gz diff --git a/ase-gui.desktop b/ase-gui.desktop new file mode 100644 index 0000000..3c716e6 --- /dev/null +++ b/ase-gui.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Version=1.0 +Name=ase-gui +GenericName=ase-gui +Comment=Atomic Simulation Environment GUI +Categories=GTK;Science;Chemistry;Physics;Education; +Exec=ag +Icon=ase +Terminal=false +Type=Application +Name[en_US]=ase-gui +GenericName[en_US]=ase-gui +Comment[en_US]=Atomic Simulation Environment GUI + diff --git a/python-ase-3.7.1.3184.pythonenv.patch b/python-ase-3.7.1.3184.pythonenv.patch new file mode 100644 index 0000000..868aeb8 --- /dev/null +++ b/python-ase-3.7.1.3184.pythonenv.patch @@ -0,0 +1,278 @@ +diff -Naur python-ase-3.7.1.3184.orig/ase/calculators/castep.py python-ase-3.7.1.3184/ase/calculators/castep.py +--- python-ase-3.7.1.3184.orig/ase/calculators/castep.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/calculators/castep.py 2013-06-21 18:55:15.787386759 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python + # -*- coding: utf-8 -*- + """This module defines an interface to CASTEP for + use by the ASE (Webpage: http://wiki.fysik.dtu.dk/ase) +diff -Naur python-ase-3.7.1.3184.orig/ase/calculators/jacapo/setup.py python-ase-3.7.1.3184/ase/calculators/jacapo/setup.py +--- python-ase-3.7.1.3184.orig/ase/calculators/jacapo/setup.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/calculators/jacapo/setup.py 2013-06-21 18:55:15.385385219 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + from distutils.core import setup + from glob import glob +diff -Naur python-ase-3.7.1.3184.orig/ase/calculators/lammps.py python-ase-3.7.1.3184/ase/calculators/lammps.py +--- python-ase-3.7.1.3184.orig/ase/calculators/lammps.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/calculators/lammps.py 2013-06-21 18:55:15.687386376 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + # lammps.py (2011/03/29) + # An ASE calculator for the LAMMPS classical MD code available from +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/ag.py python-ase-3.7.1.3184/ase/gui/ag.py +--- python-ase-3.7.1.3184.orig/ase/gui/ag.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/ag.py 2013-06-21 18:55:18.014395291 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + # Copyright 2008, 2009 + # CAMd (see accompanying license files for details). +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/constraints.py python-ase-3.7.1.3184/ase/gui/constraints.py +--- python-ase-3.7.1.3184.orig/ase/gui/constraints.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/constraints.py 2013-06-21 18:55:18.113395670 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + from math import sqrt + + import gtk +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/dft.py python-ase-3.7.1.3184/ase/gui/dft.py +--- python-ase-3.7.1.3184.orig/ase/gui/dft.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/dft.py 2013-06-21 18:55:17.838394617 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + from math import sqrt + + import gtk +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/execute.py python-ase-3.7.1.3184/ase/gui/execute.py +--- python-ase-3.7.1.3184.orig/ase/gui/execute.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/execute.py 2013-06-21 18:55:17.997395226 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + import __future__ + import gtk + from gettext import gettext as _ +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/graphs.py python-ase-3.7.1.3184/ase/gui/graphs.py +--- python-ase-3.7.1.3184.orig/ase/gui/graphs.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/graphs.py 2013-06-21 18:55:17.986395184 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + from math import sqrt + + import gtk +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/movie.py python-ase-3.7.1.3184/ase/gui/movie.py +--- python-ase-3.7.1.3184.orig/ase/gui/movie.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/movie.py 2013-06-21 18:55:17.964395099 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + import gtk + from gettext import gettext as _ + import gobject +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/render.py python-ase-3.7.1.3184/ase/gui/render.py +--- python-ase-3.7.1.3184.orig/ase/gui/render.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/render.py 2013-06-21 18:55:17.920394931 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + import gtk + from gettext import gettext as _ + from ase.gui.widgets import pack, Help, oops +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/repeat.py python-ase-3.7.1.3184/ase/gui/repeat.py +--- python-ase-3.7.1.3184.orig/ase/gui/repeat.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/repeat.py 2013-06-21 18:55:17.777394383 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + import gtk + from math import sqrt + from gettext import gettext as _ +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/settings.py python-ase-3.7.1.3184/ase/gui/settings.py +--- python-ase-3.7.1.3184.orig/ase/gui/settings.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/settings.py 2013-06-21 18:55:17.784394410 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + import gtk + from ase.gui.widgets import pack + from gettext import gettext as _ +diff -Naur python-ase-3.7.1.3184.orig/ase/gui/view.py python-ase-3.7.1.3184/ase/gui/view.py +--- python-ase-3.7.1.3184.orig/ase/gui/view.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/gui/view.py 2013-06-21 18:55:17.764394333 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + # Emacs: treat this as -*- python -*- + +diff -Naur python-ase-3.7.1.3184.orig/ase/infrared.py python-ase-3.7.1.3184/ase/infrared.py +--- python-ase-3.7.1.3184.orig/ase/infrared.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/infrared.py 2013-06-21 18:55:14.946383537 +0200 +@@ -107,7 +107,6 @@ + + Example: + +- >>> #!/usr/bin/env python + + >>> from ase.io import read + >>> from ase.calculators.siesta import Siesta +diff -Naur python-ase-3.7.1.3184.orig/ase/lattice/compounds.py python-ase-3.7.1.3184/ase/lattice/compounds.py +--- python-ase-3.7.1.3184.orig/ase/lattice/compounds.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/lattice/compounds.py 2013-06-21 18:55:17.195392153 +0200 +@@ -86,7 +86,6 @@ + + Example:: + +- #!/usr/bin/env python + + from ase.lattice.hexagonal import * + from ase.lattice.compounds import * +@@ -131,7 +130,6 @@ + O .3059 0 1/4 .0068 .0083 .00046 .0042 .00058 .0012 + + Example: +- #!/usr/bin/env python + from ase.lattice.hexagonal import * + from ase.lattice.compounds import * + import ase.io as io +diff -Naur python-ase-3.7.1.3184.orig/ase/test/castep/castep_interface.py python-ase-3.7.1.3184/ase/test/castep/castep_interface.py +--- python-ase-3.7.1.3184.orig/ase/test/castep/castep_interface.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/test/castep/castep_interface.py 2013-06-21 18:55:16.650390065 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python + """Simple shallow test of the CASTEP interface""" + + import os +diff -Naur python-ase-3.7.1.3184.orig/ase/test/vasp/vasp_Al_volrelax.py python-ase-3.7.1.3184/ase/test/vasp/vasp_Al_volrelax.py +--- python-ase-3.7.1.3184.orig/ase/test/vasp/vasp_Al_volrelax.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/test/vasp/vasp_Al_volrelax.py 2013-06-21 18:55:16.468389368 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python + + """ + Run VASP tests to ensure that relaxation with the VASP calculator works. +diff -Naur python-ase-3.7.1.3184.orig/ase/test/vasp/vasp_co.py python-ase-3.7.1.3184/ase/test/vasp/vasp_co.py +--- python-ase-3.7.1.3184.orig/ase/test/vasp/vasp_co.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/test/vasp/vasp_co.py 2013-06-21 18:55:16.461389341 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python + + """ + Run some VASP tests to ensure that the VASP calculator works. This +diff -Naur python-ase-3.7.1.3184.orig/ase/test/vtk_data.py python-ase-3.7.1.3184/ase/test/vtk_data.py +--- python-ase-3.7.1.3184.orig/ase/test/vtk_data.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/test/vtk_data.py 2013-06-21 18:55:16.228388448 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + import sys + +diff -Naur python-ase-3.7.1.3184.orig/ase/test/vtk_pipeline.py python-ase-3.7.1.3184/ase/test/vtk_pipeline.py +--- python-ase-3.7.1.3184.orig/ase/test/vtk_pipeline.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/test/vtk_pipeline.py 2013-06-21 18:55:16.688390211 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + from ase.visualize.vtk import requirevtk + +diff -Naur python-ase-3.7.1.3184.orig/ase/thermochemistry.py python-ase-3.7.1.3184/ase/thermochemistry.py +--- python-ase-3.7.1.3184.orig/ase/thermochemistry.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/thermochemistry.py 2013-06-21 18:55:17.586393651 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + """Modules for calculating thermochemical information from computational + outputs.""" + +diff -Naur python-ase-3.7.1.3184.orig/ase/utils/adsorb.py python-ase-3.7.1.3184/ase/utils/adsorb.py +--- python-ase-3.7.1.3184.orig/ase/utils/adsorb.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/utils/adsorb.py 2013-06-21 18:55:14.640382365 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + # Copyright 2010 CAMd + # (see accompanying license files for details). +diff -Naur python-ase-3.7.1.3184.orig/ase/utils/molecule_test.py python-ase-3.7.1.3184/ase/utils/molecule_test.py +--- python-ase-3.7.1.3184.orig/ase/utils/molecule_test.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/utils/molecule_test.py 2013-06-21 18:55:14.631382330 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + """This module defines extensible classes for running tests on molecules. + +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/ase_castep_demo.py python-ase-3.7.1.3184/doc/ase/calculators/ase_castep_demo.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/ase_castep_demo.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/ase_castep_demo.py 2013-06-21 18:55:19.635401501 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python + """This simple demo calculates the total energy of CO molecules + using once LDA and once PBE as xc-functional. Obviously + some parts in this scripts are longer than necessary, but are shown +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/dftb_ex1_relax.py python-ase-3.7.1.3184/doc/ase/calculators/dftb_ex1_relax.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/dftb_ex1_relax.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/dftb_ex1_relax.py 2013-06-21 18:55:19.653401570 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + import os + +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/dftb_ex2_relax.py python-ase-3.7.1.3184/doc/ase/calculators/dftb_ex2_relax.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/dftb_ex2_relax.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/dftb_ex2_relax.py 2013-06-21 18:55:19.628401474 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python + + from ase.io import read, write + from ase.calculators.dftb import Dftb +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/gromacs_example_mm_relax2.py python-ase-3.7.1.3184/doc/ase/calculators/gromacs_example_mm_relax2.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/gromacs_example_mm_relax2.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/gromacs_example_mm_relax2.py 2013-06-21 18:55:19.716401812 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + """ + An example for using gromacs calculator in ase. + Atom positions are relaxed. +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/gromacs_example_mm_relax.py python-ase-3.7.1.3184/doc/ase/calculators/gromacs_example_mm_relax.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/gromacs_example_mm_relax.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/gromacs_example_mm_relax.py 2013-06-21 18:55:19.691401716 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + """ An example for using gromacs calculator in ase. + Atom positions are relaxed. + A sample call: +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/test_ase_qmmm_manyqm.py python-ase-3.7.1.3184/doc/ase/calculators/test_ase_qmmm_manyqm.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/test_ase_qmmm_manyqm.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/test_ase_qmmm_manyqm.py 2013-06-21 18:55:19.622401451 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + """ demo run for ase_qmmm_manyqm calculator """ + + # ./test_ase_qmmm_manyqm.py gromacs_mm-relax.g96 +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/turbomole_ex1_relax.py python-ase-3.7.1.3184/doc/ase/calculators/turbomole_ex1_relax.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/turbomole_ex1_relax.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/turbomole_ex1_relax.py 2013-06-21 18:55:19.671401639 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + import os + + from ase.io import read,write +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/turbomole_ex2_diffuse_usingNEB.py python-ase-3.7.1.3184/doc/ase/calculators/turbomole_ex2_diffuse_usingNEB.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/turbomole_ex2_diffuse_usingNEB.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/turbomole_ex2_diffuse_usingNEB.py 2013-06-21 18:55:19.697401739 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + import os + +diff -Naur python-ase-3.7.1.3184.orig/doc/ase/calculators/turbomole_ex3_restart_diffuse_usingNEB.py python-ase-3.7.1.3184/doc/ase/calculators/turbomole_ex3_restart_diffuse_usingNEB.py +--- python-ase-3.7.1.3184.orig/doc/ase/calculators/turbomole_ex3_restart_diffuse_usingNEB.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/ase/calculators/turbomole_ex3_restart_diffuse_usingNEB.py 2013-06-21 18:55:19.703401762 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + + import os + +diff -Naur python-ase-3.7.1.3184.orig/doc/exercises/siesta2/siesta2.py python-ase-3.7.1.3184/doc/exercises/siesta2/siesta2.py +--- python-ase-3.7.1.3184.orig/doc/exercises/siesta2/siesta2.py 2013-05-16 09:53:15.000000000 +0200 ++++ python-ase-3.7.1.3184/doc/exercises/siesta2/siesta2.py 2013-06-21 18:55:19.774402034 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + from ase.io import read + from ase.constraints import FixAtoms + from ase.calculators.siesta import Siesta diff --git a/python-ase-3.7.1.3184.svnversion_io.patch b/python-ase-3.7.1.3184.svnversion_io.patch new file mode 100644 index 0000000..8433d93 --- /dev/null +++ b/python-ase-3.7.1.3184.svnversion_io.patch @@ -0,0 +1,11 @@ +--- python-ase-3.7.1.3184.orig/ase/svnversion_io.py 2013-05-16 09:53:16.000000000 +0200 ++++ python-ase-3.7.1.3184/ase/svnversion_io.py 2013-06-21 19:21:57.267548959 +0200 +@@ -34,7 +34,7 @@ + cmd = popen3('svnversion -n '+dir)[1] # assert we are in the project dir + output = cmd.read().strip() + cmd.close() +- if output.startswith('exported'): ++ if output.startswith('exported') or output.startswith('Unversioned'): + # we build from exported source (e.g. rpmbuild) + output = None + return output diff --git a/python-ase.spec b/python-ase.spec new file mode 100644 index 0000000..15b1f39 --- /dev/null +++ b/python-ase.spec @@ -0,0 +1,156 @@ +%global upstream_name ase + +%global upstream_svn %{nil} +%global upstream_svn .3184 + +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + +Name: python-ase +Version: 3.7.1%{?upstream_svn} +Release: 4%{?dist} +Summary: Atomic Simulation Environment +%{?el5:Group: Applications/Scientific} + + +# The entire source code is LGPLv2+ except: +# ase/io/fortranfile.py which is MIT +License: LGPLv2+ and MIT + +URL: https://wiki.fysik.dtu.dk/ase/ +Source0: https://wiki.fysik.dtu.dk/ase-files/%{name}-%{version}.tar.gz +Source1: https://wiki.fysik.dtu.dk/ase-files/%{upstream_name}-gui.desktop + +# The 2 patches below are specific to 3.7.1.3184 and already applied upstream +# https://trac.fysik.dtu.dk/projects/ase/changeset/3257 +Patch0: %{name}-%{version}.pythonenv.patch +# https://trac.fysik.dtu.dk/projects/ase/changeset/3259 +Patch1: %{name}-%{version}.svnversion_io.patch + +%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} +BuildArch: noarch + +%global PKG_TOP $RPM_BUILD_DIR/%{name}-%{version} + +BuildRequires: python2-devel +BuildRequires: gettext +BuildRequires: desktop-file-utils + +BuildRequires: numpy + +%if 0%{?rhel} && 0%{?rhel} <= 6 +Requires: pygtk2 +%endif +Requires: python-matplotlib + + +%description +The Atomic Simulation Environment (ASE) is the common part of the simulation +tools developed at CAMd. ASE provides Python modules for manipulating atoms, +analyzing simulations, visualization etc. + + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 +%patch1 -p1 + +# save %%{upstream_name}.ico and remove the doc directory +cp -p doc/_static/%{upstream_name}.ico %{upstream_name}.png +rm -rf doc + + +%build +%{__python} setup.py build 2>&1 | tee p2build.log + + +%install +%{?el5:rm -rf $RPM_BUILD_ROOT} +%{__python} setup.py install --skip-build --prefix=%{_prefix} \ + --optimize=1 --root $RPM_BUILD_ROOT 2>&1 | tee p2install.log + +# doc would go under $RPM_BUILD_ROOT%%{_datadir}/%%{name} +# if only we get rid of povray dependency one could build doc with: +# cd $RPM_BUILD_ROOT%%{_datadir}/%%{name}/doc&& sphinx-build . _build + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications +desktop-file-install \ +--dir $RPM_BUILD_ROOT%{_datadir}/applications \ +--vendor "%{upstream_name}" \ +%{SOURCE1} + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps +install -m 644 %{upstream_name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps + +# To avoid: "Found '/tmp/rpmbuild/build/' in installed files; aborting" +for file in `find %{PKG_TOP} -name "*.log"`; do + sed -i "s|$RPM_BUILD_ROOT||g" ${file} +done + +# we store translations in ase/gui/po/*/*/ag.mo +# but /usr/lib/rpm/find-lang.sh wants locale (Fedora) or share/locale (el6) +mkdir $RPM_BUILD_ROOT%{python_sitelib}/%{upstream_name}/gui/share +cp -rp $RPM_BUILD_ROOT%{python_sitelib}/%{upstream_name}/gui/po $RPM_BUILD_ROOT%{python_sitelib}/%{upstream_name}/gui/share/locale +%find_lang ag +rm -rf $RPM_BUILD_ROOT%{python_sitelib}/%{upstream_name}/gui/share +sed -i "s|share/locale|po|g" %{PKG_TOP}/ag.lang + +# create list of all installed dirs/files(exclude *.mo) and concat with ag.lang +find $RPM_BUILD_ROOT%{python_sitelib}/%{upstream_name} -type d | xargs -I _file echo "%dir _file" > %{PKG_TOP}/d.list +find $RPM_BUILD_ROOT%{python_sitelib}/%{upstream_name} -type f ! -name "*.mo" > %{PKG_TOP}/f.list +cat %{PKG_TOP}/ag.lang %{PKG_TOP}/d.list %{PKG_TOP}/f.list > %{PKG_TOP}/files.list +# trim the $RPM_BUILD_ROOT +sed -i "s|$RPM_BUILD_ROOT||g" %{PKG_TOP}/files.list + + +%check +export PYTHONPATH=`pwd`/build/lib +mkdir p2testase && cd p2testase +%{__python} -c "from ase.test import test; test(verbosity=2, display=False)" 2>&1 | tee ../p2testase.log +cd - + + +%clean +%{?el5:rm -rf $RPM_BUILD_ROOT} + + +%files -f files.list +%doc *.log COPYING* LICENSE README.txt MANIFEST.in +%{_bindir}/* +%{?!el5:%{python_sitelib}/*.egg-info} +%{_datadir}/applications/%{upstream_name}-gui.desktop +%{_datadir}/pixmaps/%{upstream_name}.png + + +%changelog +* Tue Jun 25 2013 Marcin Dulak 3.7.1.3184-4 +- fix bug #976886 c#9 + +* Sun Jun 23 2013 Marcin Dulak 3.7.1.3184-3 +- builds on el5 +- remove doc +- %%{upstream_name}.png goes to %%{_datadir}/pixmaps +- fix bug #976886 c#4 + +* Sat Jun 22 2013 Marcin Dulak 3.7.1.3184-2 +- include desktop file +- partly fix bug#976886#c1 and #c2 + +* Fri Jun 21 2013 Marcin Dulak 3.7.1.3184-1 +- trimmed for Fedora/RHEL + +* Mon May 6 2013 Marcin Dulak 3.6.1-2 +- include docs + +* Mon Jun 11 2012 Marcin Dulak 3.6.0-1 +- restructured for build.opensuse.org and Fedora based on campos-ase3.spec + +* Tue Apr 27 2010 Marcin Dulak +- common Requires for EL, Fedora, openSUSE +- perform testase.py when building +- removed dependecy in python-lxml + +* Wed Jun 18 2008 Marcin Dulak +- FC 9: set -- ${variable} converts dashes of $1 into underlines so use $2 + +* Mon Jun 16 2008 Marcin Dulak +- initial version diff --git a/sources b/sources index e69de29..35bd39f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7a6b3709d14790ea5912393e93a3712c python-ase-3.7.1.3184.tar.gz