Accepting request 479855 from devel:languages:python:singlespec
Implement single-spec version OBS-URL: https://build.opensuse.org/request/show/479855 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=56
This commit is contained in:
parent
82c4dd80ee
commit
7710aff419
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 16 02:58:11 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement single-spec version
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Mar 15 21:33:50 UTC 2017 - astieger@suse.com
|
Wed Mar 15 21:33:50 UTC 2017 - astieger@suse.com
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pytz
|
Name: python-pytz
|
||||||
Version: 2016.10
|
Version: 2016.10
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -31,21 +32,19 @@ Patch0: fix-tests.patch
|
|||||||
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
|
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
|
||||||
Patch1: system_zoneinfo.patch
|
Patch1: system_zoneinfo.patch
|
||||||
Patch2: pytz-2016.10-fix-tests-with-2017a.patch
|
Patch2: pytz-2016.10-fix-tests-with-2017a.patch
|
||||||
Requires: timezone
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python-nose
|
BuildRequires: %{python_module devel}
|
||||||
# Tests will use this package
|
# Test requirements
|
||||||
BuildRequires: timezone >= 2017a
|
BuildRequires: %{python_module nose}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRequires: timezone
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
Requires: timezone
|
||||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
||||||
%else
|
|
||||||
BuildArch: noarch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: python-tz = 2014b
|
Provides: python-tz = 2014b
|
||||||
Obsoletes: python-tz < 2014b
|
Obsoletes: python-tz < 2014b
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
pytz - World Timezone Definitions for Python
|
pytz - World Timezone Definitions for Python
|
||||||
@ -61,29 +60,27 @@ Amost all of the Olson timezones are supported.
|
|||||||
%setup -q -n pytz-%{version}
|
%setup -q -n pytz-%{version}
|
||||||
# Disable test which is not working (and documented so)
|
# Disable test which is not working (and documented so)
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%if 0%{?suse_version} >= 1310
|
|
||||||
# Use system tz database
|
# Use system tz database
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
# timezone 2017 a is currently only available in Leap 42.1
|
||||||
|
%if 0%{?sle_version} == 120100 && 0%{?is_opensuse}
|
||||||
%patch2 -p2
|
%patch2 -p2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# For rpmlint warning: remove shebang from python library:
|
# For rpmlint warning: remove shebang from python library:
|
||||||
sed -i '/^#!/d' ./pytz/tzfile.py
|
sed -i '/^#!/d' ./pytz/tzfile.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
# Remove the pytz zoneinfo only if we use the system tz database
|
%python_expand rm -fr %{buildroot}%{$python_sitelib}/pytz/zoneinfo
|
||||||
%if 0%{?suse_version} >= 1310
|
|
||||||
rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
|
|
||||||
%endif
|
|
||||||
%fdupes %{buildroot}%{python_sitelib}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
nosetests
|
%python_expand nosetests-%{$python_bin_suffix}
|
||||||
|
|
||||||
%files
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE.txt README.txt
|
%doc LICENSE.txt README.txt
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user