# # spec file for package python-ordered-set # # Copyright (c) 2022 SUSE LLC # Copyright (c) 2019 Neal Gompa . # # 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/ # %define skip_python36 1 %define skip_python38 1 %define skip_python39 1 %define skip_python311 1 # in order to avoid rewriting for subpackage generator %define mypython python %global modname ordered-set %global dir_name ordered_set %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global flavor %{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %else %define psuffix %{nil} %bcond_with test %endif %define skip_python2 1 Name: python-%{modname}%{psuffix} Version: 4.1.0 Release: 1.3 Summary: Custom MutableSet that remembers its order License: MIT URL: https://github.com/rspeer/ordered-set Source: https://files.pythonhosted.org/packages/source/o/%{modname}/%{modname}-%{version}.tar.gz # this package is build dependency of setuptools BuildRequires: %{python_module base} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %if %{with test} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} %endif # work around boo#1186870 Provides: %{mypython}%{python_version}dist(%modname) = %{version} %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" Provides: %{mypython}3dist(%modname) = %{version} %endif %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 %setup -q -n %{modname}-%{version} # we are build dep of setuptools sed -i -e 's:from setuptools :from distutils.core :g' setup.py %build %python_build %install %if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %check %if %{with test} %pytest %endif %if !%{with test} %files %{python_files} %license MIT-LICENSE %doc README.md %{python_sitelib}/%{dir_name}/ # Note: The distutils generated egg-info is not a directory %{python_sitelib}/%{dir_name}-%{version}-py%{python_version}.egg-info %endif %changelog * Thu Sep 8 2022 John Vandenberg - Update URL to https://github.com/rspeer/ordered-set - The egg-info is now a single file instead of a directory - Update to v4.1.0 * Packaged using flit. Wheels now exist, and setuptools is no longer required. * The code is in ordered_set/__init__.py instead of ordered_set.py. * There is an ordered_set/py.typed so that type checkers know about the types. * Use the type aliases SetLike[T] and OrderedSetInitializer[T] to simplify some types. * Updated the way overloaded type signatures are written to what MyPy currently expects. * Minimum Python version is 3.7. * Tue Dec 28 2021 Ben Greiner - Do not disable python36 here. This package is so deep in the dependency tree, you have to do it globally. * Mon Dec 27 2021 ecsos - Upstream supoorted only python >= 3.5, so disable python 2 and also python 3.6 (End of support). * Mon Sep 6 2021 Martin Hauke - Update to version 4.0.2 * Restore compatibility with Python 3.5 * fix packaging, remove vestiges of type stubs * Remove unused type * Add a mailmap * remove old .pyi type stub * Implement code review suggestions for types * Code formatting (isort and black) * Move type annotations inline * Directly distribute type stub file via PEP 561 * Handle another indexing case from NumPy * Thu Jun 17 2021 Ben Greiner - Add Provides: for python*dist(ordered-set): work around boo#1186870 * Fri Oct 23 2020 Matej Cepl - Use %%pycache_only %%python_sitelib instead of %%python3_sitelib fixes gh#openSUSE/python-rpm-macros#64#issuecomment-715373348 * Wed Aug 12 2020 Matej Cepl - Replace Source URL with the standard one * Fri Jan 17 2020 Tomáš Chvátal - Use psuffix properly to not override src packages * Thu Oct 17 2019 Tomáš Chvátal - Switch to multibuild and make sure we build without setuptools in order to avoid buildcycle * Wed May 22 2019 Marketa Calabkova - update to version 3.1.1 * Implement set api. SLICE_ALL getitem returns copy * Add tests for new API. Replace nose with pytest. * OrderedSet now inherits from collections.Sequence, __eq__ now checks order of sequences * Drop Python 2.6 support; Python and pytest already don't support it * Fixed bitwise and * Added comprehensive binary operation consistency checks * Fix DeprecationWarning due to collections.abc in Python 3.7 * Use set literal instead of function * Fix error when fancy indexing by a NumPy array * Update in-place operations to be O(N) * Add testing and document support for Python 3.7 * Mon Apr 15 2019 Tomáš Chvátal - Format with spec-cleaner * Sat Mar 2 2019 Neal Gompa - Initial packaging for openSUSE