2019-04-15 09:25:45 +00:00
|
|
|
#
|
2021-12-28 00:50:44 +00:00
|
|
|
# spec file for package python-ordered-set
|
2019-04-15 09:25:45 +00:00
|
|
|
#
|
2021-06-18 19:35:39 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2019-04-15 09:25:45 +00:00
|
|
|
# Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>.
|
|
|
|
|
#
|
|
|
|
|
# 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 https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2021-06-18 19:35:39 +00:00
|
|
|
# in order to avoid rewriting for subpackage generator
|
|
|
|
|
%define mypython python
|
2020-08-12 20:31:11 +00:00
|
|
|
%global modname ordered-set
|
2019-04-15 09:25:45 +00:00
|
|
|
%global dir_name ordered_set
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-10-17 09:02:27 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
|
%define psuffix -test
|
|
|
|
|
%bcond_without test
|
|
|
|
|
%else
|
|
|
|
|
%define psuffix %{nil}
|
|
|
|
|
%bcond_with test
|
|
|
|
|
%endif
|
2021-12-28 00:50:44 +00:00
|
|
|
%define skip_python2 1
|
2020-08-12 20:31:11 +00:00
|
|
|
Name: python-%{modname}%{psuffix}
|
2021-09-07 06:33:42 +00:00
|
|
|
Version: 4.0.2
|
2019-04-15 09:25:45 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Custom MutableSet that remembers its order
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/LuminosoInsight/ordered-set
|
2020-08-12 20:31:11 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/o/%{modname}/%{modname}-%{version}.tar.gz
|
2019-10-17 09:02:27 +00:00
|
|
|
# this package is build dependency of setuptools
|
|
|
|
|
BuildRequires: %{python_module base}
|
2019-04-15 09:27:15 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
BuildArch: noarch
|
2019-10-17 09:02:27 +00:00
|
|
|
%if %{with test}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
%endif
|
2021-06-18 19:35:39 +00:00
|
|
|
# work around boo#1186870
|
|
|
|
|
Provides: %{mypython}%{python_version}dist(%modname) = %{version}
|
|
|
|
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
|
|
|
Provides: %{mypython}3dist(%modname) = %{version}
|
|
|
|
|
%endif
|
2019-04-15 09:25:45 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
An OrderedSet is a custom MutableSet that remembers its order, so that every
|
|
|
|
|
entry has an index that can be looked up.
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-08-12 20:31:11 +00:00
|
|
|
%setup -q -n %{modname}-%{version}
|
2019-10-17 09:02:27 +00:00
|
|
|
# we are build dep of setuptools
|
|
|
|
|
sed -i -e 's:from setuptools :from distutils.core :g' setup.py
|
2019-04-15 09:25:45 +00:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
2019-10-17 09:02:27 +00:00
|
|
|
%if !%{with test}
|
2019-04-15 09:25:45 +00:00
|
|
|
%python_install
|
2019-10-17 09:02:27 +00:00
|
|
|
# ensure egg-info is a directory
|
|
|
|
|
%{python_expand rm -rf %{buildroot}%{$python_sitelib}/*.egg-info
|
|
|
|
|
cp -r ordered_set.egg-info %{buildroot}%{$python_sitelib}/ordered_set-%{version}-py%{$python_version}.egg-info
|
|
|
|
|
}
|
2019-04-15 09:25:45 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-10-17 09:02:27 +00:00
|
|
|
%endif
|
2019-04-15 09:25:45 +00:00
|
|
|
|
|
|
|
|
%check
|
2019-10-17 09:02:27 +00:00
|
|
|
%if %{with test}
|
2019-05-22 14:50:10 +00:00
|
|
|
%pytest test.py
|
2019-10-17 09:02:27 +00:00
|
|
|
%endif
|
2019-04-15 09:25:45 +00:00
|
|
|
|
2019-10-17 09:02:27 +00:00
|
|
|
%if !%{with test}
|
2019-04-15 09:25:45 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%license MIT-LICENSE
|
2019-05-22 14:50:10 +00:00
|
|
|
%doc README.md
|
2019-04-15 09:25:45 +00:00
|
|
|
%{python_sitelib}/%{dir_name}-*
|
|
|
|
|
%{python_sitelib}/%{dir_name}.py*
|
2020-10-23 14:43:40 +00:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/%{dir_name}.*
|
2019-10-17 09:02:27 +00:00
|
|
|
%endif
|
2019-04-15 09:25:45 +00:00
|
|
|
|
|
|
|
|
%changelog
|