Use proper PYTHONPATH with python3 test

- Use %license
- Drop BuildRoot and %clean
This commit is contained in:
Orion Poplawski 2016-05-16 15:07:38 -06:00
parent 79038d121c
commit e2a5df9200

View File

@ -6,7 +6,7 @@
Name: pytz Name: pytz
Version: 2016.4 Version: 2016.4
Release: 1%{?dist} Release: 2%{?dist}
Summary: World Timezone Definitions for Python Summary: World Timezone Definitions for Python
Group: Development/Languages Group: Development/Languages
@ -16,8 +16,6 @@ Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{versi
# Patch to use the system supplied zoneinfo files # Patch to use the system supplied zoneinfo files
Patch0: pytz-zoneinfo.patch Patch0: pytz-zoneinfo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: pytest BuildRequires: pytest
@ -78,28 +76,31 @@ rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
%check %check
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -v PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -v
%if 0%{?with_python3} %if 0%{?with_python3}
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python3_version} -v PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v
%endif %endif
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%doc CHANGES.txt LICENSE.txt README.txt %license LICENSE.txt
%doc CHANGES.txt README.txt
%{python2_sitelib}/pytz/ %{python2_sitelib}/pytz/
%{python2_sitelib}/*.egg-info %{python2_sitelib}/*.egg-info
%if 0%{?with_python3} %if 0%{?with_python3}
%files -n python3-pytz %files -n python3-pytz
%doc CHANGES.txt LICENSE.txt README.txt %license LICENSE.txt
%doc CHANGES.txt README.txt
%{python3_sitelib}/pytz/ %{python3_sitelib}/pytz/
%{python3_sitelib}/*.egg-info %{python3_sitelib}/*.egg-info
%endif # with_python3 %endif # with_python3
%changelog %changelog
* Mon May 16 2016 Orion Poplawski <orion@cora.nwra.com> 2016.4-1
- Use proper PYTHONPATH with python3 test
- Use %%license
- Drop BuildRoot and %%clean
* Sat Apr 23 2016 Matěj Cepl <mcepl@redhat.com> 2016.4-1 * Sat Apr 23 2016 Matěj Cepl <mcepl@redhat.com> 2016.4-1
- Update to 2016.4 (RHBZ #1265036) - Update to 2016.4 (RHBZ #1265036)