From 89b10b8c688f2eaeb5e0f87faafc111b530c8691 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Nov 17 2016 10:18:14 +0000 Subject: Update to 2.6; Modernize spec; Run test suite Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore index aee567e..1dbf18c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ q-2.5.tar.gz +/q-2.6.tar.gz diff --git a/python-q.spec b/python-q.spec index c9c0061..35013a2 100644 --- a/python-q.spec +++ b/python-q.spec @@ -4,102 +4,86 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif -Name: python-q -Version: 2.5 -Release: 6%{?dist} +%global modname q + +Name: python-%{modname} +Version: 2.6 +Release: 1%{?dist} Summary: Quick and dirty python debugging output License: ASL 2.0 URL: https://pypi.python.org/pypi/q -Source0: https://pypi.python.org/packages/source/q/q/q-%{version}.tar.gz -# Fix for using @q decorator -# Submitted upstream: https://github.com/mithro/q/pull/1 -Patch0: https://github.com/mithro/q/pull/1.diff -# Prettyprint dicts and other builtins -# Submitted upstream: https://github.com/mithro/q/pull/2 -Patch1: https://github.com/mithro/q/pull/2.diff -# mentioned here: https://github.com/zestyping/q/pull/15 to judge interest -Patch2: fix-introspection.patch -BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools +Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz +# https://github.com/zestyping/q/pull/28 +Patch0001: 0001-Alternate-pprint-for-values.patch -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%endif # with_python3 - -%description -If you've ever been frustrated trying to debug with print because a web -application or a unittesting framework is swallowing your debugging output, -q will make you jump for joy. - - import q - variable = 'Hmmm... something happened here' - q(variable) +BuildArch: noarch +%global _description \ +If you have ever been frustrated trying to debug with print because a web\ +application or a unittesting framework is swallowing your debugging output,\ +q will make you jump for joy.\ +\ + import q\ + variable = 'Hmmm... something happened here'\ + q(variable)\ +\ cat /tmp/q -%if 0%{?with_python3} -%package -n python3-q -Summary: Quick and dirty python3 debugging output +%description %{_description} -%description -n python3-q -If you've ever been frustrated trying to debug with print because a web -application or a unittesting framework is swallowing your debugging output, -q will make you jump for joy. - import q - variable = 'Hmmm... something happened here' - q(variable) +%package -n python2-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{modname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools -cat /tmp/q +%description -n python2-%{modname} %{_description} -This package contains the q module for python3 +Python 2 version. -%endif # with_python3 +%package -n python3-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{modname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools -%prep -%setup -q -n q-%{version} +%description -n python3-%{modname} %{_description} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +Python 3 version. -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif # with_python3 +%prep +%autosetup -n %{modname}-%{version} -p1 %build -%{__python} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif # with_python3 +%py2_build +%py3_build %install -rm -rf %{buildroot} -%{__python} setup.py install --skip-build --root %{buildroot} +%py2_install +%py3_install -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -popd -%endif # with_python3 +%check +%{__python2} test/test_*.py -v +%{__python3} test/test_*.py -v -%files +%files -n python2-%{modname} %doc README.md -%{python_sitelib}/* +%{python2_sitelib}/%{modname}-*.egg-info/ +%{python2_sitelib}/%{modname}.py* -%if 0%{?with_python3} -%files -n python3-q +%files -n python3-%{modname} %doc README.md -%{python3_sitelib}/* -%endif # with_python3 +%{python3_sitelib}/%{modname}-*.egg-info/ +%{python3_sitelib}/%{modname}.py +%{python3_sitelib}/__pycache__/%{modname}.* %changelog +* Thu Nov 17 2016 Igor Gnatenko - 2.6-1 +- Update to 2.6 +- Modernize spec +- Run test suite + * Tue Jul 19 2016 Fedora Release Engineering - 2.5-6 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages diff --git a/sources b/sources index 1729c7e..0bf902a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d4c4ee489dea818f85dfcfb9156fe8de q-2.5.tar.gz +0251ce38a2dce77917a8929d7968e035 q-2.6.tar.gz