15
0
forked from pool/python-exrex
Files
python-exrex/python-exrex.spec
Sebastian Wagner eeb88b45f0 - run the tests
- remove add-license.patch
- Update to revision 49909345:
 - Fix: added py_modules
 - Fix: Typo in email address
 - Add support for \w and \W
 - Add full license file
 - Add MANIFEST to include metafiles
 - add rstr.xeger
 - README: group related projects and describe them
 - fix: utf-8
 - Add support for min-repeat
 - Escape literal special characters in sre_to_string method.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exrex?expand=0&rev=12
2021-02-25 19:33:21 +00:00

72 lines
2.2 KiB
RPMSpec

#
# spec file for package python-exrex
#
# Copyright (c) 2021 SUSE LLC
#
# 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 revision fd1e21ffc7c16fd5637a5c440224766417e840f9
Name: python-exrex
Version: 0.10.5+git119
Release: 0
Summary: Irregular methods for regular expressions
License: AGPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/asciimoo/exrex
#Source: https://files.pythonhosted.org/packages/source/e/exrex/exrex-%%{version}.tar.gz
Source: https://github.com/asciimoo/exrex/archive/%{revision}.tar.gz#/exrex-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
A command line tool and python module that generates all or random matching strings to a given regular expression and more.
%prep
%setup -q -n exrex-%{revision}
sed -i '1s/^#!.*//' exrex.py
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/exrex
rm %{buildroot}%{_bindir}/exrex.py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand # comment
PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./tests.py}
%post
%python_install_alternative exrex
%postun
%python_uninstall_alternative exrex
%files %{python_files}
%{python_sitelib}/*
%license COPYING
%doc README.md doc/
%python_alternative %{_bindir}/exrex
%changelog