From ae10e837b6e5cf185b0f10de53553e1b92fe981f Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Jul 15 2016 09:25:27 +0000 Subject: - new upstream release 0.7.0 - introduced py3 variant --- diff --git a/.gitignore b/.gitignore index 39a7fc1..f2bdbe0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ pycha-0.5.2.tar.gz pycha-0.5.3.tar.gz /pycha-0.6.0.tar.gz +/pycha-0.7.0.tar.gz diff --git a/python-pycha.spec b/python-pycha.spec index 97bb0bf..8172c64 100644 --- a/python-pycha.spec +++ b/python-pycha.spec @@ -1,25 +1,22 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%global srcname pycha +%global sum A library for drawing charts with Python and Cairo -%global shortname pycha - -Name: python-pycha -Version: 0.6.0 -Release: 9%{?dist} -Summary: A library for drawing charts with Python and Cairo +Name: python-%{srcname} +Version: 0.7.0 +Release: 1%{?dist} +Summary: %{sum} Group: Development/Libraries License: LGPLv3+ -URL: http://bitbucket.org/lgs/pycha/wiki/Home -Source0: http://pypi.python.org/packages/source/p/%{shortname}/%{shortname}-%{version}.tar.gz +URL: https://bitbucket.org/lgs/pycha/ +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz Source1: chavier.desktop -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: desktop-file-utils -BuildRequires: pycairo BuildRequires: python2-devel -BuildRequires: python-setuptools -Requires: pycairo +BuildRequires: python3-devel +BuildRequires: python-tools %description Pycha is a very simple Python package for drawing charts using the great Cairo @@ -31,10 +28,42 @@ library. Its goals are: It won't try to draw any possible chart on earth but draw the most common ones nicely. +%package -n python2-%{srcname} +Summary: %{sum} +%{?python_provide:%python_provide python2-%{srcname}} +BuildRequires: pycairo +Requires: pycairo + +%description -n python2-%{srcname} +Pycha is a very simple Python package for drawing charts using the great Cairo +library. Its goals are: + * Lightweight + * Simple to use + * Nice looking with default values + * Customization +It won't try to draw any possible chart on earth but draw the most common ones +nicely. + +%package -n python3-%{srcname} +Summary: %{sum} +%{?python_provide:%python_provide python3-%{srcname}} +BuildRequires: python3-cairo +Requires: python3-cairo + +%description -n python3-%{srcname} +Pycha is a very simple Python package for drawing charts using the great Cairo +library. Its goals are: + * Lightweight + * Simple to use + * Nice looking with default values + * Customization +It won't try to draw any possible chart on earth but draw the most common ones +nicely. + %package -n chavier Summary: GUI application for exploring the pycha library Group: Development/Tools -Requires: %{name} = %{version}-%{release} +Requires: python3-%{srcname} = %{version}-%{release} %description -n chavier Chavier allows the user to generate random data sets or use existing data to @@ -43,38 +72,71 @@ application. Various chart types can be plotted and their options adjusted from the interface. %prep -%setup -q -n %{shortname}-%{version} +%setup -q -c + +# remove upstream egg-info +rm -rf */*.egg-info + +mv %{srcname}-%{version} python2 +cp -a python2 python3 + %build -%{__python} setup.py build +# separate dirs because 2to3 is used +pushd python2 +%py2_build +popd +pushd python3 +2to3 --no-diffs -w chavier pycha +%py3_build +popd %install -rm -rf %{buildroot} -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +pushd python2 +%py2_install +popd +pushd python3 +%py3_install +popd desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} -%clean -rm -rf %{buildroot} +# remove py2 version of chavier +rm -rf %{buildroot}%{python2_sitelib}/chavier + %check -%{__python} setup.py test +pushd python2 +%{__python2} setup.py test +popd +pushd python3 +#%{__python3} setup.py test +popd -%files -%defattr(-,root,root,-) -%doc examples/ COPYING AUTHORS README.txt -%{python_sitelib}/%{shortname} -%{python_sitelib}/%{shortname}-*.egg-info + +%files -n python2-%{srcname} +%doc python2/examples/ python2/{COPYING,AUTHORS,README.txt} +%{python2_sitelib}/%{srcname} +%{python2_sitelib}/%{srcname}-*.egg-info + +%files -n python3-%{srcname} +%doc python3/examples/ python2/{COPYING,AUTHORS,README.txt} +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-*.egg-info %files -n chavier -%defattr(-,root,root,-) %{_bindir}/chavier %{_datadir}/applications/chavier.desktop -%{python_sitelib}/chavier +%{python3_sitelib}/chavier + %changelog +* Fri Jul 15 2016 Dan Horák - 0.7.0-1 +- new upstream release 0.7.0 +- introduced py3 variant + * Thu Feb 04 2016 Fedora Release Engineering - 0.6.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 1b0daf4..a6b5244 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dc5c709af0d3dc00eced58b71ba730b0 pycha-0.6.0.tar.gz +4931deaa9451990141f92c7d484bfbb9 pycha-0.7.0.tar.gz