File python3-pyx.spec of Package python3-pyx
#
# spec file for package python
#
# Copyright (c) 2014 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 PyX
Name: python3-pyx
BuildRequires: python3-devel
Summary: Python graphics package
License: GPL-2.0+
Group: Development/Languages/Python
Version: 0.14.1
Release: 0
Source0: https://pypi.python.org/packages/source/P/%{modname}/%{modname}-%{version}.tar.gz
Url: http://pyx.sourceforge.net/
BuildRequires: python3
Recommends: %{name}-doc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
%{name} is a python package for the creation of encapsulated
PostScript figures. It provides both an abstraction of PostScript
and a TeX/LaTeX interface.
Complex tasks like 2d and 3d plots in publication-ready quality are
built out of these primitives.
%package doc
Summary: Documentation for %{name}
License: GPL-2.0+
Group: Documentation/Other
Requires: %{name} = %{version}
%description doc
%{name} is a python package for the creation of encapsulated
PostScript figures. It provides both an abstraction of PostScript
and a TeX/LaTeX interface.
Complex tasks like 2d and 3d plots in publication-ready quality are
built out of these primitives.
This package provides the documentation for %{name}.
%prep
%setup -q -n %{modname}-%{version}
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} \
--root=%{buildroot}
# REMOVE SPURIOUS EXEC PERMS AND SHEBANGS
for i in color gradientname connector pathstyles graph arrows graph2;
do
chmod -x manual/${i}.py
done
for i in surface grid color bar
do
sed -i "1{/\#!\/usr\/bin\/env python/d}" examples/3dgraphs/${i}.py
chmod -x examples/3dgraphs/${i}.py
done
sed -i "1{/\#!\/usr\/bin\/env python/d}" manual/colorname.py
chmod -x manual/colorname.py
%files
%defattr(-,root,root)
%doc AUTHORS CHANGES LICENSE README
%{python3_sitelib}/pyx/
%{python3_sitelib}/%{modname}-%{version}-py%{py3_ver}.egg-info
%files doc
%defattr(-,root,root)
%doc examples manual contrib
%changelog