From 30d6b7b6a4fefbdaaf7d3826bfdce66735373331257f58894b266b6539565b1c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 11 Dec 2024 21:32:18 +0000 Subject: [PATCH] - fix: change dependency from nntplib to pynntp - First attempt to create .build.yml script for builds.sr.ht OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygn?expand=0&rev=9 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + pygn-0.11.0.tar.gz | 3 ++ pygn-0.12.0.tar.gz | 3 ++ python-pygn.changes | 49 ++++++++++++++++++++++++ python-pygn.spec | 92 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 171 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pygn-0.11.0.tar.gz create mode 100644 pygn-0.12.0.tar.gz create mode 100644 python-pygn.changes create mode 100644 python-pygn.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pygn-0.11.0.tar.gz b/pygn-0.11.0.tar.gz new file mode 100644 index 0000000..7693b49 --- /dev/null +++ b/pygn-0.11.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2abb370f3640713f6f48f4b60a473c01b417cc5e9de9d9aaaa077aef0001c3b +size 114448 diff --git a/pygn-0.12.0.tar.gz b/pygn-0.12.0.tar.gz new file mode 100644 index 0000000..80c17d4 --- /dev/null +++ b/pygn-0.12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b1b7a437e3826b165c6097b660b080b3c80419e6bd27101c3918b851db21f51 +size 391474 diff --git a/python-pygn.changes b/python-pygn.changes new file mode 100644 index 0000000..e202154 --- /dev/null +++ b/python-pygn.changes @@ -0,0 +1,49 @@ +------------------------------------------------------------------- +Wed Dec 11 21:28:12 UTC 2024 - Matej Cepl + - fix: change dependency from nntplib to pynntp + - First attempt to create .build.yml script for builds.sr.ht + +------------------------------------------------------------------- +Tue Jan 2 22:37:19 UTC 2024 - Dirk Müller + +- require setuptools + +------------------------------------------------------------------- +Wed Jun 28 11:44:19 UTC 2023 - Matej Cepl + +- Update to 0.11.0: + - Rewrite to new structure and abandoning setuptools +- Update to 0.10.3: + - refactor: rearrange the project to the src/ layout + (https://todo.sr.ht/~mcepl/pygn/7) + - Fix also pyproject.toml to generate what seems right. + - Add the explicit dependency on nntplib for Python >= 3.12 + (gh#python/cpython!104894). + - Use email.policy.SMTP to be perfectly conforming with RFCs. + Perhaps fixes: https://todo.sr.ht/~mcepl/pygn/6 + - Rename README to README.md + - Switch hosting of the project to Sourcehut. + - Also add the text of GPLv3. + - When sending nntp message fails, log the message to temporary + file. + - Convert documentation from .maff to plain HTML. + - Parse email messages from binary files (Fixes #24 + on GitLab (see also gh#python/cpython#69731 and + gh#python/cpython#85479) +- We actually don't need pytest. + +------------------------------------------------------------------- +Wed Nov 30 17:46:32 UTC 2022 - Matej Cepl + +- Clean up SPEC file, make rpmlint happy. + +------------------------------------------------------------------- +Wed Jul 1 14:23:32 UTC 2020 - Matej Cepl + +- Update to 0.10.2: + - Fix packaging, switch off failing tests for now. + +------------------------------------------------------------------- +Wed Jul 1 10:28:22 UTC 2020 - Matej Cepl + +- Initial packaging effort diff --git a/python-pygn.spec b/python-pygn.spec new file mode 100644 index 0000000..db4a4a9 --- /dev/null +++ b/python-pygn.spec @@ -0,0 +1,92 @@ +# +# spec file for package python-pygn +# +# Copyright (c) 2024 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/ +# + + +Name: python-pygn +Version: 0.12.0 +Release: 0 +Summary: The Python Gateway Script: news2mail mail2news gateway +License: GPL-3.0-only +Group: Productivity/Networking/News/Utilities +URL: https://git.sr.ht/~mcepl/pygn +Source: https://files.pythonhosted.org/packages/source/p/pygn/pygn-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pynntp if %python-base >= 3.12} +BuildRequires: %{python_module rply} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-rply +Requires: (python-pynntp if python-base >= 3.12) +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +Python Gateway Script from news to mail and vice versa. + +It is intended to be a full SMTP/NNTP rfc compliant gateway +with whitelist manager. + +You will probably have to install a mail-transport-agent and/or +news-transport-system package to manage SMTP/NNTP traffic. + +MTA is needed for mail2news service, since mail have to be +processed on a box where pyg is installed. You can use a remote +smtpserver for news2mail. + +News system is useful but not needed, since you can send articles to a +remote SMTP server (ie: moderated NG) where is installed pyg, otherwise you +will need it. + +It refers to rfc 822 (mail) and 850 (news). + +%prep +%autosetup -p1 -n pygn-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/pygm2n +%python_clone -a %{buildroot}%{_bindir}/pygn2m +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest discover -v test + +%post +%python_install_alternative pygm2n pygn2m + +%postun +%python_uninstall_alternative pygm2n pygn2m + +%files %{python_files} +%{python_sitelib}/mail2news.py +%{python_sitelib}/news2mail.py +%{python_sitelib}/whitelist.py +%{python_sitelib}/wlp.py +%{python_sitelib}/wlp_parser.py +%{python_sitelib}/pygn-%{version}*-info +%pycache_only %{python_sitelib}/__pycache__/*.pyc +%python_alternative %{_bindir}/pygm2n +%python_alternative %{_bindir}/pygn2m + +%changelog