diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-11 01:35:14 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 01:35:14 +0000 |
| commit | 42352e94110e61341a4cf0249750b59e249fe53a (patch) | |
| tree | 23bcfec1b1ed5ca2f826709284fde4e2ed4d06a0 /python-exrex.spec | |
| parent | 615ce23e578a5a0968812241a561ba56026bf0e3 (diff) | |
automatic import of python-exrex
Diffstat (limited to 'python-exrex.spec')
| -rw-r--r-- | python-exrex.spec | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/python-exrex.spec b/python-exrex.spec new file mode 100644 index 0000000..e5e3235 --- /dev/null +++ b/python-exrex.spec @@ -0,0 +1,129 @@ +%global _empty_manifest_terminate_build 0 +Name: python-exrex +Version: 0.11.0 +Release: 1 +Summary: Irregular methods for regular expressions +License: AGPLv3+ +URL: https://github.com/asciimoo/exrex +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/21/39/8f143f76fa9f6048cb42fa0594fc1a57fd143e69a7d42a35d4e16cabc7d9/exrex-0.11.0.tar.gz +BuildArch: noarch + + +%description +Irregular methods for regular expressions. +Exrex is a command line tool and python module that generates all - or random - matching strings to a given regular expression and more. +It's pure python, without external dependencies. +There are regular expressions with infinite matching strings (eg.: `[a-z]+`), in these cases exrex limits the maximum length of the infinite parts. +Exrex uses generators, so the memory usage does not depend on the number of matching strings. +[](https://crate.io/packages/exrex/) [](https://crate.io/packages/exrex/) +*Features* + * Generating all matching strings + * Generating a random matching string + * Counting the number of matching strings + * Simplification of regular expressions +### Installation +To install exrex, simply: +```bash +$ pip install exrex +``` +or +```bash +$ easy_install exrex +``` + +%package -n python3-exrex +Summary: Irregular methods for regular expressions +Provides: python-exrex +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-exrex +Irregular methods for regular expressions. +Exrex is a command line tool and python module that generates all - or random - matching strings to a given regular expression and more. +It's pure python, without external dependencies. +There are regular expressions with infinite matching strings (eg.: `[a-z]+`), in these cases exrex limits the maximum length of the infinite parts. +Exrex uses generators, so the memory usage does not depend on the number of matching strings. +[](https://crate.io/packages/exrex/) [](https://crate.io/packages/exrex/) +*Features* + * Generating all matching strings + * Generating a random matching string + * Counting the number of matching strings + * Simplification of regular expressions +### Installation +To install exrex, simply: +```bash +$ pip install exrex +``` +or +```bash +$ easy_install exrex +``` + +%package help +Summary: Development documents and examples for exrex +Provides: python3-exrex-doc +%description help +Irregular methods for regular expressions. +Exrex is a command line tool and python module that generates all - or random - matching strings to a given regular expression and more. +It's pure python, without external dependencies. +There are regular expressions with infinite matching strings (eg.: `[a-z]+`), in these cases exrex limits the maximum length of the infinite parts. +Exrex uses generators, so the memory usage does not depend on the number of matching strings. +[](https://crate.io/packages/exrex/) [](https://crate.io/packages/exrex/) +*Features* + * Generating all matching strings + * Generating a random matching string + * Counting the number of matching strings + * Simplification of regular expressions +### Installation +To install exrex, simply: +```bash +$ pip install exrex +``` +or +```bash +$ easy_install exrex +``` + +%prep +%autosetup -n exrex-0.11.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-exrex -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.11.0-1 +- Package Spec generated |
