File python-pathlib2.spec of Package python-pathlib2

# spec file for package python-pathlib2
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%if 0%{?suse_version} >= 1500
%bcond_without test
%bcond_with    test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name:           python-pathlib2
Version:        2.3.4
Release:        0
Summary:        Object-oriented filesystem paths
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module setuptools}
%if %{with test}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module scandir}
BuildRequires:  %{python_module six}
BuildRequires:  python3-testsuite
BuildRequires:  python-rpm-macros
Requires:       python-six
%if %{python3_version_nodots} < 35
Requires:       python-scandir
Requires:       python2-scandir
BuildArch:      noarch
Provides:       %oldpython-pathlib2 = %{version}
Obsoletes:      %oldpython-pathlib2 <= %{version}

The goal of pathlib2 is to provide a backport of
`standard pathlib <>`_
module which tracks the standard library module,
so all the newest features of the standard pathlib can be
used also on older Python versions.

%autosetup -n pathlib2-%{version}



%if %{with test}
# nothing provides test module in python2
# test module is not available in SLE-12
python3 tests/

%files %{python_files}
%license LICENSE.rst