diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-10 14:44:48 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 14:44:48 +0000 |
commit | 57da56907ca0acb1c151959f11d3b02c201e7e7e (patch) | |
tree | 9b32bcf028557a0e3a67658b946af346e41d7836 | |
parent | d31ec57cb2e2fa524c659d3d389ff958532aca4a (diff) |
automatic import of python-ngram
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-ngram.spec | 75 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 77 insertions, 0 deletions
@@ -0,0 +1 @@ +/ngram-4.0.3.tar.gz diff --git a/python-ngram.spec b/python-ngram.spec new file mode 100644 index 0000000..b7aa541 --- /dev/null +++ b/python-ngram.spec @@ -0,0 +1,75 @@ +%global _empty_manifest_terminate_build 0 +Name: python-ngram +Version: 4.0.3 +Release: 1 +Summary: A `set` subclass providing fuzzy search based on N-grams. +License: LGPL3 +URL: https://github.com/gpoulter/python-ngram +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/df/cc/e7cc2c12f9a147fedf5dda81b00f6bcbf02a450e9c227949958b2b3e8de2/ngram-4.0.3.tar.gz +BuildArch: noarch + + +%description +To install python-ngram from `PyPI`_:: + pip install ngram + +%package -n python3-ngram +Summary: A `set` subclass providing fuzzy search based on N-grams. +Provides: python-ngram +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-ngram +To install python-ngram from `PyPI`_:: + pip install ngram + +%package help +Summary: Development documents and examples for ngram +Provides: python3-ngram-doc +%description help +To install python-ngram from `PyPI`_:: + pip install ngram + +%prep +%autosetup -n ngram-4.0.3 + +%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-ngram -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 4.0.3-1 +- Package Spec generated @@ -0,0 +1 @@ +35ca772a58361dc7d26f6d049bb5f74a ngram-4.0.3.tar.gz |