LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-reportlab.spec of Package python-reportlab (Project spins:invis)

# spec file for package python-reportlab
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

%define modname reportlab
Name:           python-%{modname}
Version:        2.5
Release:        0
Url:            http://www.reportlab.com/
Summary:        The Reportlab Toolkit
License:        BSD-2-Clause
Group:          Development/Languages/Python
Source:         http://www.reportlab.com/ftp/%{modname}-%{version}.tar.gz
Patch0:         reportlab-missing-includes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  freetype2-devel
BuildRequires:  python-devel
BuildRequires:  python-imaging
BuildRequires:  python-xml
Requires:       python-imaging
Provides:       python-ReportLab = %{version}
Obsoletes:      python-ReportLab < %{version}
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

The ReportLab Toolkit. An Open Source Python library for generating PDFs and graphics.

%setup -q -n %{modname}-%{version}
sed -i "1d" src/reportlab/lib/{formatters,fonts,set_ops,corp,units,pagesizes,__init__,randomtext,logger,normalDate}.py
sed -i "1d" src/reportlab/graphics/{widgets/table,barcode/test,testdrawings,testshapes}.py # Fix non-executable bits

CFLAGS="%{optflags}" python setup.py build

python setup.py install --prefix=%{_prefix} --root=%{buildroot}

python setup.py tests

%doc CHANGES.txt README.txt