Tomáš Chvátal 2020-03-14 07:54:30 +00:00 committed by Git OBS Bridge
parent 2ceb8754f0
commit 7fbde81f37
2 changed files with 16 additions and 16 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Mar 14 07:54:17 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix build without python2
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 4 12:51:30 UTC 2018 - Matej Cepl <mcepl@suse.com> Tue Dec 4 12:51:30 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-pickleshare # spec file for package python-pickleshare
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,28 +16,26 @@
# #
%bcond_without test
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-pickleshare Name: python-pickleshare
Version: 0.7.5 Version: 0.7.5
Release: 0 Release: 0
Summary: Tiny shelve-like database with concurrency support Summary: Tiny shelve-like database with concurrency support
License: MIT License: MIT
Group: Development/Languages/Python URL: https://github.com/vivainio/pickleshare
Url: https://github.com/vivainio/pickleshare
Source: https://files.pythonhosted.org/packages/source/p/pickleshare/pickleshare-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pickleshare/pickleshare-%{version}.tar.gz
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-pathlib2
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%if %{with test} BuildArch: noarch
BuildRequires: %{python_module pytest} %if %{with python2}
BuildRequires: python-pathlib2
%endif %endif
%ifpython2 %ifpython2
Requires: python-pathlib2 Requires: python-pathlib2
%endif %endif
BuildArch: noarch
%python_subpackages %python_subpackages
%description %description
@ -59,7 +57,7 @@ Installation guide: pip install path pickleshare
%prep %prep
%setup -q -n pickleshare-%{version} %setup -q -n pickleshare-%{version}
# Remove shebang # Remove shebang
sed -i '1{\@^#!/usr/bin/env python@d}' pickleshare.py sed -i '1{\@^#!%{_bindir}/env python@d}' pickleshare.py
%build %build
%python_build %python_build
@ -68,12 +66,9 @@ sed -i '1{\@^#!/usr/bin/env python@d}' pickleshare.py
%python_install %python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check %check
# need to set locale to avoid UnicodeEncodeError
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
%python_expand py.test-%{$python_bin_suffix} . %pytest .
%endif
%files %{python_files} %files %{python_files}
%doc README.md %doc README.md