2018-03-09 07:26:17 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-exrex
|
|
|
|
|
#
|
2025-05-27 10:23:40 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-03-09 07:26:17 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-04 13:26:22 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-03-09 07:34:15 +00:00
|
|
|
#
|
2018-03-09 07:26:17 +00:00
|
|
|
|
|
|
|
|
|
2025-06-09 13:26:58 +00:00
|
|
|
%bcond_without libalternatives
|
2018-03-09 07:26:17 +00:00
|
|
|
Name: python-exrex
|
2023-03-12 08:38:07 +00:00
|
|
|
Version: 0.11.0
|
2018-03-09 07:26:17 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Irregular methods for regular expressions
|
2018-03-09 07:34:15 +00:00
|
|
|
License: AGPL-3.0-or-later
|
2018-03-09 07:26:17 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-06-03 11:36:40 +00:00
|
|
|
URL: https://github.com/asciimoo/exrex
|
2021-02-25 19:33:21 +00:00
|
|
|
#Source: https://files.pythonhosted.org/packages/source/e/exrex/exrex-%%{version}.tar.gz
|
2023-03-12 08:38:07 +00:00
|
|
|
# pypi has no tests
|
|
|
|
|
Source: https://github.com/asciimoo/exrex/archive/v%{version}.tar.gz#/exrex-%{version}.tar.gz
|
2025-05-27 10:23:40 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2018-03-09 07:26:17 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-05-27 10:23:40 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2025-06-09 13:26:58 +00:00
|
|
|
BuildRequires: alts
|
2018-03-09 07:26:17 +00:00
|
|
|
BuildRequires: fdupes
|
2018-03-09 07:34:15 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2025-06-09 13:26:58 +00:00
|
|
|
Requires: alts
|
2019-06-03 11:58:37 +00:00
|
|
|
Requires: python-setuptools
|
2018-03-09 07:26:17 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2021-02-25 19:33:21 +00:00
|
|
|
A command line tool and python module that generates all or random matching strings to a given regular expression and more.
|
2018-03-09 07:26:17 +00:00
|
|
|
|
|
|
|
|
%prep
|
2023-03-12 08:38:07 +00:00
|
|
|
%setup -q -n exrex-%{version}
|
2018-03-09 07:26:17 +00:00
|
|
|
sed -i '1s/^#!.*//' exrex.py
|
|
|
|
|
|
|
|
|
|
%build
|
2025-05-27 10:23:40 +00:00
|
|
|
%pyproject_wheel
|
2018-03-09 07:26:17 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-05-27 10:23:40 +00:00
|
|
|
%pyproject_install
|
2020-05-27 10:10:03 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/exrex
|
2018-03-09 07:26:17 +00:00
|
|
|
rm %{buildroot}%{_bindir}/exrex.py
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
2019-06-03 11:36:40 +00:00
|
|
|
%check
|
2021-02-25 19:33:21 +00:00
|
|
|
%{python_expand # comment
|
2021-02-25 20:11:51 +00:00
|
|
|
LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./tests.py}
|
2019-06-03 11:36:40 +00:00
|
|
|
|
2025-06-09 13:26:58 +00:00
|
|
|
%pre
|
|
|
|
|
%python_libalternatives_reset_alternative exrex
|
2020-05-27 10:10:03 +00:00
|
|
|
|
2018-03-09 07:26:17 +00:00
|
|
|
%files %{python_files}
|
2023-02-27 19:16:16 +00:00
|
|
|
%{python_sitelib}/exrex*
|
|
|
|
|
%{python_sitelib}/__pycache__/exrex.*
|
2023-03-12 08:38:07 +00:00
|
|
|
%{python_sitelib}/exrex-%{version}*-info
|
2018-03-09 07:26:17 +00:00
|
|
|
%license COPYING
|
2021-02-25 19:33:21 +00:00
|
|
|
%doc README.md doc/
|
2020-05-27 10:10:03 +00:00
|
|
|
%python_alternative %{_bindir}/exrex
|
2018-03-09 07:26:17 +00:00
|
|
|
|
|
|
|
|
%changelog
|