2013-05-30 12:35:27 +00:00
|
|
|
# This package contains macros that provide functionality relating to
|
|
|
|
# Software Collections. These macros are not used in default
|
|
|
|
# Fedora builds, and should not be blindly copied or enabled.
|
|
|
|
# Specifically, the "scl" macro must not be defined in official Fedora
|
|
|
|
# builds. For more information, see:
|
|
|
|
# http://docs.fedoraproject.org/en-US/Fedora_Contributor_Documentation
|
|
|
|
# /1/html/Software_Collections_Guide/index.html
|
|
|
|
|
|
|
|
%{?scl:%scl_package python-%{pypi_name}}
|
|
|
|
%{!?scl:%global pkg_name %{name}}
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
# Created by pyp2rpm-0.5.1
|
2014-03-07 13:07:00 +00:00
|
|
|
# if building for SCL or on RHEL, don't build python3- subpackage
|
|
|
|
%if %{?scl:0}%{!?scl:1} && %{?rhel:0}%{!?rhel:1}
|
|
|
|
%global with_python3 1
|
|
|
|
%else
|
|
|
|
%global with_python3 0
|
|
|
|
%endif
|
2012-06-27 05:37:41 +00:00
|
|
|
%global pypi_name sure
|
|
|
|
|
2013-05-30 12:35:27 +00:00
|
|
|
Name: %{?scl_prefix}python-%{pypi_name}
|
2014-03-07 13:07:00 +00:00
|
|
|
Version: 1.2.5
|
2014-05-16 05:57:27 +00:00
|
|
|
Release: 3%{?dist}
|
2012-06-27 05:37:41 +00:00
|
|
|
Summary: Assertion toolbox for python
|
|
|
|
|
2013-02-18 13:14:10 +00:00
|
|
|
License: GPLv3+
|
2012-06-27 05:37:41 +00:00
|
|
|
URL: https://github.com/gabrielfalcao/sure
|
|
|
|
Source0: http://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
|
|
# Already asked upstream to include COPYING in the source tar:
|
|
|
|
# https://github.com/gabrielfalcao/sure/issues/17
|
|
|
|
Source1: https://raw.github.com/gabrielfalcao/sure/master/COPYING
|
|
|
|
# To get tests:
|
|
|
|
# git clone https://github.com/gabrielfalcao/sure.git && cd sure
|
2014-03-07 13:07:00 +00:00
|
|
|
# git checkout 1.2.5 && tar czf sure-1.2.5-tests.tgz tests/
|
2012-06-27 05:37:41 +00:00
|
|
|
Source2: %{pypi_name}-%{version}-tests.tgz
|
2014-03-31 11:26:55 +00:00
|
|
|
# Remove unnecessary dependencies in setup.py which might break
|
|
|
|
# depending packages builds, https://github.com/gabrielfalcao/sure/pull/57
|
|
|
|
Patch0: sure-remove-unnecessary-dependencies.patch
|
2012-06-27 05:37:41 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2013-05-30 12:35:27 +00:00
|
|
|
BuildRequires: %{?scl_prefix}python2-devel
|
|
|
|
BuildRequires: %{?scl_prefix}python-nose
|
|
|
|
BuildRequires: %{?scl_prefix}python-setuptools
|
2012-06-27 05:37:41 +00:00
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
%if 0%{with_python3}
|
|
|
|
BuildRequires: %{?scl_prefix}python3-devel
|
|
|
|
BuildRequires: %{?scl_prefix}python3-nose
|
|
|
|
BuildRequires: %{?scl_prefix}python3-setuptools
|
|
|
|
%endif
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
%description
|
|
|
|
A Python assertion toolbox that works fine with nose.
|
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
Summary: Assertion toolbox for python 3
|
|
|
|
|
|
|
|
%description -n python3-%{pypi_name}
|
|
|
|
A Python assertion toolbox that works fine with nose.
|
|
|
|
%endif # with_python3
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{pypi_name}-%{version}
|
|
|
|
# Remove bundled egg-info
|
|
|
|
rm -rf %{pypi_name}.egg-info
|
|
|
|
cp %{SOURCE1} .
|
2013-11-29 10:57:08 +00:00
|
|
|
tar xzf %{SOURCE2}
|
|
|
|
|
2014-03-31 11:26:55 +00:00
|
|
|
%patch0 -p1
|
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/bin/env python|#!%{__python3}|'
|
|
|
|
%endif # with_python3
|
2012-06-27 05:37:41 +00:00
|
|
|
|
|
|
|
%build
|
2013-05-30 12:35:27 +00:00
|
|
|
%{?scl:scl enable %{scl} "}
|
2012-06-27 05:37:41 +00:00
|
|
|
%{__python} setup.py build
|
2013-05-30 12:35:27 +00:00
|
|
|
%{?scl:"}
|
2012-06-27 05:37:41 +00:00
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
%if 0%{with_python3}
|
|
|
|
pushd %{py3dir}
|
2014-03-07 13:07:00 +00:00
|
|
|
LANG=en_US.utf8 %{__python3} setup.py build
|
2013-11-29 10:57:08 +00:00
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
%install
|
2013-05-30 12:35:27 +00:00
|
|
|
%{?scl:scl enable %{scl} "}
|
2012-06-27 05:37:41 +00:00
|
|
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
2013-05-30 12:35:27 +00:00
|
|
|
%{?scl:"}
|
2012-06-27 05:37:41 +00:00
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
2014-03-07 13:07:00 +00:00
|
|
|
LANG=en_US.utf8 %{__python3} setup.py install --skip-build --root %{buildroot}
|
2013-11-29 10:57:08 +00:00
|
|
|
popd
|
|
|
|
%endif # with_python3
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
%check
|
2013-05-30 12:35:27 +00:00
|
|
|
%{?scl:scl enable %{scl} "}
|
2012-06-27 05:37:41 +00:00
|
|
|
nosetests
|
2013-05-30 12:35:27 +00:00
|
|
|
%{?scl:"}
|
2012-06-27 05:37:41 +00:00
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
/usr/bin/nosetests-3*
|
|
|
|
popd
|
|
|
|
%endif # with_python3
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
%files
|
|
|
|
%doc COPYING
|
|
|
|
%{python_sitelib}/%{pypi_name}
|
|
|
|
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
|
|
2014-03-07 13:07:00 +00:00
|
|
|
%if 0%{?with_python3}
|
2013-11-29 10:57:08 +00:00
|
|
|
%files -n python3-%{pypi_name}
|
|
|
|
%doc COPYING
|
|
|
|
%{python3_sitelib}/%{pypi_name}
|
|
|
|
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
2014-03-07 13:07:00 +00:00
|
|
|
%endif
|
2013-11-29 10:57:08 +00:00
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
%changelog
|
2014-05-16 05:57:27 +00:00
|
|
|
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.5-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
|
|
2014-03-31 11:26:55 +00:00
|
|
|
* Mon Mar 31 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.5-2
|
|
|
|
- Remove unneeded dependencies from setup.py.
|
|
|
|
Resolves: rhbz#1082400
|
|
|
|
|
2014-03-07 13:07:00 +00:00
|
|
|
* Fri Mar 07 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.5-1
|
|
|
|
- Updated to 1.2.5
|
|
|
|
- Fix with_python3 macro definition to work correctly on EPEL, too.
|
|
|
|
|
2013-11-29 10:57:08 +00:00
|
|
|
* Fri Nov 29 2013 Miro Hrončok <mhroncok@redhat.com> - 1.2.3-1
|
|
|
|
- Updated
|
|
|
|
- Introduced Python 3 subpackage
|
|
|
|
|
2013-08-04 10:01:43 +00:00
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.7-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
|
2013-05-30 12:35:27 +00:00
|
|
|
* Thu May 30 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.7-2
|
|
|
|
- Introduce SCL macros in the specfile.
|
|
|
|
|
2013-02-18 13:14:10 +00:00
|
|
|
* Mon Feb 18 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.7-1
|
|
|
|
- Update to 1.1.7.
|
|
|
|
- License change from MIT to GPLv3.
|
|
|
|
|
2013-02-14 20:29:52 +00:00
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
|
2012-11-05 12:30:15 +00:00
|
|
|
* Mon Nov 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.0.6-1
|
|
|
|
- Update to 1.0.6.
|
|
|
|
|
2012-07-21 09:56:19 +00:00
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.3-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
|
2012-06-27 05:37:41 +00:00
|
|
|
* Tue Jun 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.10.3-2
|
|
|
|
- python-devel should be python2-devel
|
|
|
|
- URL now points to the real homepage of the project
|
|
|
|
|
|
|
|
* Fri Jun 22 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.10.3-1
|
|
|
|
- Initial package.
|