From 638088d0782c32fec114c2e6039af3a26e59be8f65a7c3393ce6021e37b702c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 9 Jun 2025 14:22:27 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ndg-httpsclient?expand=0&rev=16 --- .gitattributes | 23 +++++++++ .gitignore | 1 + ndg_httpsclient-0.5.1.tar.gz | 3 ++ python-ndg-httpsclient.changes | 86 ++++++++++++++++++++++++++++++++++ python-ndg-httpsclient.spec | 69 +++++++++++++++++++++++++++ 5 files changed, 182 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ndg_httpsclient-0.5.1.tar.gz create mode 100644 python-ndg-httpsclient.changes create mode 100644 python-ndg-httpsclient.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/ndg_httpsclient-0.5.1.tar.gz b/ndg_httpsclient-0.5.1.tar.gz new file mode 100644 index 0000000..ec94038 --- /dev/null +++ b/ndg_httpsclient-0.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d72faed0376ab039736c2ba12e30695e2788c4aa569c9c3e3d72131de2592210 +size 26665 diff --git a/python-ndg-httpsclient.changes b/python-ndg-httpsclient.changes new file mode 100644 index 0000000..5f9cc61 --- /dev/null +++ b/python-ndg-httpsclient.changes @@ -0,0 +1,86 @@ +------------------------------------------------------------------- +Mon Jun 9 14:21:34 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Mon Jun 2 14:36:11 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Thu May 21 10:56:33 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Sun Jun 2 12:32:13 UTC 2019 - Jan Engelhardt + +- Use noun phrase in summary. + +------------------------------------------------------------------- +Wed May 29 12:54:21 UTC 2019 - Marketa Calabkova + +- update to version 0.5.1 + 0.5.* + * Drop support for EOL Python 2.6 and 3.3 + * Updated SSL Context objects to default to TLS 1.2 + * Fix to Subject Alternative Name handling to allow for + certificates with more than 64 names (max now 1024). + 0.4.* + * Fix to ndg namespace package warning issue + * Minor fix for installation: set minimum release for pyasn1 + * Fix to bug in ndg.httpsclient.utils.open_url - duplicate open call. + * Moved LICENSE file into package + +------------------------------------------------------------------- +Tue Dec 4 12:50:44 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Thu Aug 24 13:46:22 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + +------------------------------------------------------------------- +Fri Jun 12 07:20:53 UTC 2015 - t.gruner@katodev.de + +- Initial Version 0.4.0 + * Made dual compatible with Python 2 / 3. + + 0.3.3 +----- + * Fix to add in AnotherName for ``subjectAltNames`` field - added for support for CACert issued + certs (thanks to Gu1). + * Fix to HTTP Basic Auth option for ``ndg.httpsclient.utils.main`` + * Fix to ``ServerSSLCertVerification`` so that it can pass a function-based callback instead of using ``__call__``. In newer versions of OpenSSL (>= 0.14) the latter failed because of a request for ``__name__`` attribute. + +0.3.2 +----- + * Fix to SubjectAltNames support check - should only be enabled if pyasn1 is + installed. + * Fix to open_url: HTTP Request object was being created inside if headers is + None block - now corrected to create regardless. + * Added http basic auth support to script. (Thanks to Willem van Engen) + +0.3.1 +----- + * extended utils functions to support keyword for passing additional urllib2 + handlers. + +0.3.0 +----- + * Added ndg.httpsclient.utils.fetch_stream_from_url function and added + parameter for data to post in open_url and fetch_* methods. + * fix to ndg.httpsclient.utils module _should_use_proxy and open_url functions + +0.2.0 +----- + * added support for SSL verification with subjectAltNames using pyasn1 + * fixed minor bug - SSL cert DN prefix matching + +0.1.0 +----- +Initial release + diff --git a/python-ndg-httpsclient.spec b/python-ndg-httpsclient.spec new file mode 100644 index 0000000..1b4a833 --- /dev/null +++ b/python-ndg-httpsclient.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-ndg-httpsclient +# +# Copyright (c) 2025 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/ +# + + +%bcond_without libalternatives +Name: python-ndg-httpsclient +Version: 0.5.1 +Release: 0 +Summary: HTTPS support for httplib and urllib2 using PyOpenSSL +License: BSD-2-Clause +Group: Development/Languages/Python +URL: https://github.com/cedadev/ndg_httpsclient/ +Source: https://files.pythonhosted.org/packages/source/n/ndg_httpsclient/ndg_httpsclient-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-pyOpenSSL +Requires: python-pyasn1 >= 0.1.1 +BuildArch: noarch +%python_subpackages + +%description +This is a HTTPS client implementation for httplib and urllib2 based on +PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the +default provided with Python and importantly enables full verification of the +SSL peer. + +%prep +%setup -q -n ndg_httpsclient-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/ndg_httpclient +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +# tests require internet connection + +%pre +%python_libalternatives_reset_alternative ndg_httpclient + +%files %{python_files} +%doc README.md +%license ndg/httpsclient/LICENSE +%{python_sitelib}/ndg +%{python_sitelib}/ndg[-_]httpsclient-%{version}*-info +%python_alternative %{_bindir}/ndg_httpclient + +%changelog