Accepting request 84196 from devel:languages:python

- Fix non-executable scripts
- Removed %clean section and CFLAGS, not needed

OBS-URL: https://build.opensuse.org/request/show/84196
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-odfpy?expand=0&rev=8
This commit is contained in:
Sascha Peilicke 2011-09-26 08:16:48 +00:00 committed by Git OBS Bridge
commit f31e518062
2 changed files with 16 additions and 18 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 21 13:47:47 UTC 2011 - saschpe@suse.de
- Fix non-executable scripts
- Removed %clean section and CFLAGS, not needed
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 31 14:25:41 UTC 2011 - saschpe@suse.de Thu Mar 31 14:25:41 UTC 2011 - saschpe@suse.de

View File

@ -11,34 +11,29 @@
# case the license is the MIT License). An "Open Source License" is a # case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-odfpy
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define mod_name odfpy
Name: python-%{mod_name}
Version: 0.9.3 Version: 0.9.3
Release: 2 Release: 0
Url: http://opendocumentfellowship.com/development/projects/odfpy Url: http://opendocumentfellowship.com/development/projects/odfpy
Summary: Python API and tools to manipulate OpenDocument files Summary: Python API and tools to manipulate OpenDocument files
License: GPLv2+, ASLv2 License: GPL-2.0+, Apache-2.0
Group: Development/Languages/Python Group: Development/Languages/Python
Source: %{mod_name}-%{version}.tar.bz2 Source: odfpy-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-distribute
%if 0%{?suse_version} %if 0%{?suse_version}
%py_requires %py_requires
%if 0%{?suse_version} > 1110 %if 0%{?suse_version} > 1110
BuildArch: noarch BuildArch: noarch
%endif %endif
%endif %endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description %description
Odfpy is a library to read and write OpenDocument v. 1.1 files. Odfpy is a library to read and write OpenDocument v. 1.1 files.
@ -68,22 +63,19 @@ In addition to the API, there are a few scripts:
Visit http://odfpy.forge.osor.eu/ for documentation and examples. Visit http://odfpy.forge.osor.eu/ for documentation and examples.
%prep %prep
%setup -q -n %{mod_name}-%{version} %setup -q -n odfpy-%{version}
sed -i "1d" odf/{userfield,odf2xhtml,manifest,element,elementtypes,load,odfmanifest,thumbnail}.py # Fix non-executable scripts
%build %build
export CFLAGS="%{optflags}"
python setup.py build python setup.py build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%clean
rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/* %{_bindir}/*
%{_mandir}/man1/* %{_mandir}/man1/*
%python_sitelib/odf* %python_sitelib/*
%changelog %changelog