# # spec file for package python-extratools # # Copyright (c) 2018 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 https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-extratools Version: 0.8 Release: 0 Summary: 145+ extra higher-level functional tools License: MIT Group: Development/Languages/Python Url: https://github.com/chuanconggao/extratools Source: https://files.pythonhosted.org/packages/source/e/extratools/extratools-%{version}.tar.gz Source10: https://raw.githubusercontent.com/chuanconggao/extratools/%{version}/LICENSE BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module RegexOrder >= 0.2} BuildRequires: %{python_module TagStats >= 0.1.2} BuildRequires: %{python_module sh >= 1.12.13} BuildRequires: %{python_module sortedcontainers >= 1.5.10} BuildRequires: %{python_module toolz >= 0.9.0} # /SECTION Requires: python-RegexOrder >= 0.2 Requires: python-TagStats >= 0.1.2 Requires: python-sh >= 1.12.13 Requires: python-sortedcontainers >= 1.5.10 Requires: python-toolz >= 0.9.0 BuildArch: noarch %python_subpackages %description 145+ extra higher-level functional tools that go beyond standard library's itertools, functools, etc. and popular third-party libraries like toolz, funcy, and more-itertools. %prep %setup -q -n extratools-%{version} sed -i -e '/^#!\s*\//, 1d' extratools/*.py sed -i -e '/^#!\s*\//, 1d' extratools/*/*.js chmod a-x extratools/*/*.js %build %python_build cp %{SOURCE10} . %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %files %{python_files} %doc README.md %license LICENSE %python3_only %{_bindir}/extratools-flatten %python3_only %{_bindir}/extratools-remap %python3_only %{_bindir}/extratools-teststats %{python_sitelib}/* %changelog