diff --git a/_service b/_service
new file mode 100644
index 0000000..b63989e
--- /dev/null
+++ b/_service
@@ -0,0 +1,15 @@
+
+
+ https://github.com/nltk/nltk
+ git
+ web/*
+ 3.9.1
+ 3.9.1
+
+
+
+
+ *.tar
+ xz
+
+
diff --git a/nltk-3.9.1.obscpio b/nltk-3.9.1.obscpio
new file mode 100644
index 0000000..ba1fc81
--- /dev/null
+++ b/nltk-3.9.1.obscpio
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e1b59894ed0a2eebbb64fc4e0975216a5a7e1a949e61b9a4f22693e15536ff05
+size 8269325
diff --git a/nltk-3.9.1.tar.gz b/nltk-3.9.1.tar.gz
deleted file mode 100644
index 2f28f5d..0000000
--- a/nltk-3.9.1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:03e06c8c13e352133962c4395ebe0696905c9f1fbdead2d19deae37ba48eb47c
-size 2874006
diff --git a/nltk.obsinfo b/nltk.obsinfo
new file mode 100644
index 0000000..52dc688
--- /dev/null
+++ b/nltk.obsinfo
@@ -0,0 +1,4 @@
+name: nltk
+version: 3.9.1
+mtime: 1724010420
+commit: aca78cb2add4084f76b9eac921d8a73927d7a086
diff --git a/nltk_data.tar.xz b/nltk_data.tar.xz
deleted file mode 100644
index ad0e8f7..0000000
--- a/nltk_data.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d5996129d40c2598664f74f44c15a39059f5b3713a26152ad4b0220d37bf6f9d
-size 392736120
diff --git a/python-nltk.changes b/python-nltk.changes
index 1e24c05..e445000 100644
--- a/python-nltk.changes
+++ b/python-nltk.changes
@@ -1,3 +1,15 @@
+-------------------------------------------------------------------
+Tue Oct 29 08:37:43 UTC 2024 - Daniel Garcia
+
+- Use _service to download source and exclude documentation that has
+ non-commercial license (boo#1232448)
+- Remove nltk_data to avoid redistribution of files with
+ non-commercial (boo#1232448):
+ > NLTK corpora are provided under the terms given in the README file
+ > for each corpus; all are redistributable and available for
+ > non-commercial use.
+- Remove not needed skip-networked-test.patch
+
-------------------------------------------------------------------
Mon Sep 30 21:17:21 UTC 2024 - Thiago Bertoldi
diff --git a/python-nltk.spec b/python-nltk.spec
index 6c44b6b..dba8a91 100644
--- a/python-nltk.spec
+++ b/python-nltk.spec
@@ -25,7 +25,9 @@ Summary: Natural Language Toolkit
License: Apache-2.0
URL: http://nltk.org/
# SourceRepository: https://github.com/nltk/nltk
-Source0: https://github.com/nltk/%{modname}/archive/refs/tags/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
+# The _service download the source and repack without some doc files
+# that has non-commercial license. boo#1232448
+Source0: nltk-%{version}.tar.xz
# Download/Update NLTK data:
# quilt setup python-nltk.spec
# pushd nltk-?.?.?
@@ -57,11 +59,12 @@ Source0: https://github.com/nltk/%{modname}/archive/refs/tags/%{version}.
# tar -cJf ../nltk_data.tar.xz nltk_data
# popd
# see https://www.nltk.org/data.html for more details
-Source1: nltk_data.tar.xz
+########### NOTICE #########
+# Do not distribute nltk_data.tar.xz because it's licensed under
+# non-commercial, boo#1232448
+############################
+# Source1: nltk_data.tar.xz
Source99: python-nltk.rpmlintrc
-# PATCH-FIX-UPSTREAM skip-networked-test.patch gh#nltk/nltk#2969 mcepl@suse.com
-# skip tests requiring network connection
-Patch0: skip-networked-test.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
@@ -118,7 +121,7 @@ Python modules, data sets and tutorials supporting research and
development in Natural Language Processing.
%prep
-%setup -q -a1 -n %{modname}-%{version}
+%setup -q -n %{modname}-%{version}
# Fix EOL
sed -i 's/\r/\n/g; s/\n$//' \
@@ -162,15 +165,16 @@ sed -E -i "s|#![[:space:]]*%{_bindir}/env python|#!%{_bindir}/python3|" \
chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest
}
-%check
-export NLTK_DATA=$(readlink -f ./nltk_data/)
-# export PYTEST_ADDOPTS="--doctest-modules"
-# Skip tests requiring pickle.load gh#nltk/nltk#3266 (CVE-2024-39705)
-skip_tests=" or test_basic or test_increment or test_pad_asterisk or test_pad_dotdot"
-skip_tests+=" or test_pos_tag_eng or test_pos_tag_eng_universal or test_pos_tag_rus"
-skip_tests+=" or test_pos_tag_rus_universal or test_pos_tag_unknown_lang"
-skip_tests+=" or test_sent_tokenize or test_unspecified_lang or test_word_tokenize"
-%pytest -k "not (network ${skip_tests})"
+# Do not test, there's no ntlk_data, boo#1232448
+# %%check
+# export NLTK_DATA=$(readlink -f ./nltk_data/)
+# # export PYTEST_ADDOPTS="--doctest-modules"
+# # Skip tests requiring pickle.load gh#nltk/nltk#3266 (CVE-2024-39705)
+# skip_tests=" or test_basic or test_increment or test_pad_asterisk or test_pad_dotdot"
+# skip_tests+=" or test_pos_tag_eng or test_pos_tag_eng_universal or test_pos_tag_rus"
+# skip_tests+=" or test_pos_tag_rus_universal or test_pos_tag_unknown_lang"
+# skip_tests+=" or test_sent_tokenize or test_unspecified_lang or test_word_tokenize"
+# %%pytest -k "not (network ${skip_tests})"
%post
%python_install_alternative nltk
diff --git a/skip-networked-test.patch b/skip-networked-test.patch
deleted file mode 100644
index 59d031a..0000000
--- a/skip-networked-test.patch
+++ /dev/null
@@ -1,36 +0,0 @@
----
- nltk/test/unit/test_downloader.py | 4 ++++
- setup.cfg | 4 ++++
- 2 files changed, 8 insertions(+)
-
---- a/nltk/test/unit/test_downloader.py
-+++ b/nltk/test/unit/test_downloader.py
-@@ -1,6 +1,9 @@
- from nltk import download
-
-+import pytest
-
-+
-+@pytest.mark.network
- def test_downloader_using_existing_parent_download_dir(tmp_path):
- """Test that download works properly when the parent folder of the download_dir exists"""
-
-@@ -9,6 +12,7 @@ def test_downloader_using_existing_paren
- assert download_status is True
-
-
-+@pytest.mark.network
- def test_downloader_using_non_existing_parent_download_dir(tmp_path):
- """Test that download works properly when the parent folder of the download_dir does not exist"""
-
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -1,3 +1,7 @@
-+[tool:pytest]
-+markers =
-+ network: test case requires network connection
-+
- [metadata]
- license_files =
- LICENSE.txt
-