forked from pool/python-nss
Accepting request 1146357 from devel:languages:python
- Add fix-ftbfs-python3-12.patch from https://bugs.debian.org/1055552 to fix FTBFS with Python 3.12 (bsc#1219842). - Update new-setuptools.patch to make setup.py more compatible with the current setuptools. OBS-URL: https://build.opensuse.org/request/show/1146357 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nss?expand=0&rev=8
This commit is contained in:
22
fix-ftbfs-python3-12.patch
Normal file
22
fix-ftbfs-python3-12.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Description: fix ftbfs on python3.12
|
||||
Author: Bo YU <tsu.yubo@gmail.com>
|
||||
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055552
|
||||
Forwarded: no, no suitable upstream to submit this
|
||||
Last-Update: 2023-12-06
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
---
|
||||
src/py_nspr_error.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/src/py_nspr_error.c
|
||||
+++ b/src/py_nspr_error.c
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "secerr.h"
|
||||
#include "sslerr.h"
|
||||
|
||||
+#define HAVE_STDARG_PROTOTYPES 1
|
||||
+
|
||||
typedef struct {
|
||||
PyBaseExceptionObject base;
|
||||
PyObject *error_desc;
|
||||
@@ -1,9 +1,210 @@
|
||||
Index: python-nss-1.0.1/setup.cfg
|
||||
===================================================================
|
||||
--- python-nss-1.0.1.orig/setup.cfg
|
||||
+++ python-nss-1.0.1/setup.cfg
|
||||
---
|
||||
setup.cfg | 2
|
||||
setup.py | 185 +++++++++++++++++++++++++++-----------------------------------
|
||||
2 files changed, 84 insertions(+), 103 deletions(-)
|
||||
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -1,3 +1,3 @@
|
||||
[sdist]
|
||||
formats = bztar
|
||||
-dist-dir =
|
||||
+dist_dir =
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -13,8 +13,8 @@ from distutils.spawn import find_executa
|
||||
from distutils import log
|
||||
from distutils.filelist import FileList
|
||||
from distutils.util import subst_vars, change_root
|
||||
-from distutils.command.build_py import build_py as _build_py
|
||||
-from distutils.command.sdist import sdist as _sdist
|
||||
+from setuptools.command.build_py import build_py as _build_py
|
||||
+from setuptools.command.sdist import sdist as _sdist
|
||||
|
||||
name = 'python-nss'
|
||||
version = "1.0.1"
|
||||
@@ -277,103 +277,84 @@ class InstallDoc(Command):
|
||||
self.copy_file(src_path, full_dst_path)
|
||||
|
||||
|
||||
-
|
||||
-#------------------------------------------------------------------------------
|
||||
-
|
||||
-def main(argv):
|
||||
-
|
||||
- with open('README') as f:
|
||||
- long_description = f.read()
|
||||
-
|
||||
- debug_compile_args = ['-O0', '-g']
|
||||
- extra_compile_args = []
|
||||
- include_roots = []
|
||||
-
|
||||
- for arg in argv[:]:
|
||||
- if arg in ('--debug', ):
|
||||
- print("compiling with debug")
|
||||
- extra_compile_args += debug_compile_args
|
||||
- argv.remove(arg)
|
||||
- if arg in ('-t', '--trace'):
|
||||
- print("compiling with trace")
|
||||
- extra_compile_args += ['-DDEBUG']
|
||||
- argv.remove(arg)
|
||||
- if arg.startswith('--include-root'):
|
||||
- include_roots.append(arg.split('--include-root=')[1])
|
||||
- argv.remove(arg)
|
||||
-
|
||||
- nss_include_dir = find_include_dir(['nss3', 'nss'], ['nss.h', 'pk11pub.h'], include_roots=include_roots)
|
||||
- nspr_include_dir = find_include_dir(['nspr4', 'nspr'], ['nspr.h', 'prio.h'], include_roots=include_roots)
|
||||
-
|
||||
- nss_error_extension = \
|
||||
- Extension('nss.error',
|
||||
- sources = ['src/py_nspr_error.c'],
|
||||
- include_dirs = [nss_include_dir, nspr_include_dir],
|
||||
- depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h',
|
||||
- 'src/NSPRerrs.h', 'src/SSLerrs.h', 'src/SECerrs.h'],
|
||||
- libraries = ['nspr4'],
|
||||
- extra_compile_args = extra_compile_args,
|
||||
- )
|
||||
-
|
||||
- nss_io_extension = \
|
||||
- Extension('nss.io',
|
||||
- sources = ['src/py_nspr_io.c'],
|
||||
- include_dirs = [nss_include_dir, nspr_include_dir],
|
||||
- depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h', 'src/py_nspr_io.h'],
|
||||
- libraries = ['nspr4'],
|
||||
- extra_compile_args = extra_compile_args,
|
||||
- )
|
||||
-
|
||||
- nss_nss_extension = \
|
||||
- Extension('nss.nss',
|
||||
- sources = ['src/py_nss.c'],
|
||||
- include_dirs = ['src', nss_include_dir, nspr_include_dir],
|
||||
- depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h', 'src/py_nss.h'],
|
||||
- libraries = ['nspr4', 'ssl3', 'nss3', 'smime3'],
|
||||
- extra_compile_args = extra_compile_args,
|
||||
- )
|
||||
-
|
||||
- nss_ssl_extension = \
|
||||
- Extension('nss.ssl',
|
||||
- sources = ['src/py_ssl.c'],
|
||||
- include_dirs = ['src', nss_include_dir, nspr_include_dir],
|
||||
- depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h', 'src/py_nspr_io.h',
|
||||
- 'src/py_ssl.h', 'src/py_nss.h'],
|
||||
- libraries = ['nspr4', 'ssl3'],
|
||||
- extra_compile_args = extra_compile_args,
|
||||
- )
|
||||
-
|
||||
- #bug_tracker = 'https://bugzilla.redhat.com/buglist.cgi?submit&component=python-nss&product=Fedora&classification=Fedora'
|
||||
- #bug_enter = 'https://bugzilla.redhat.com/enter_bug.cgi?component=python-nss&product=Fedora&classification=Fedora',
|
||||
- setup(name = name,
|
||||
- version = version,
|
||||
- description = 'Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)',
|
||||
- long_description = long_description,
|
||||
- author = 'John Dennis',
|
||||
- author_email = 'jdennis@redhat.com',
|
||||
- maintainer = 'John Dennis',
|
||||
- maintainer_email = 'jdennis@redhat.com',
|
||||
- license = 'MPLv2.0 or GPLv2+ or LGPLv2+',
|
||||
- platforms = 'posix',
|
||||
- url = 'http://www.mozilla.org/projects/security/pki/python-nss',
|
||||
- download_url = '',
|
||||
- ext_modules = [nss_error_extension,
|
||||
- nss_io_extension,
|
||||
- nss_nss_extension,
|
||||
- nss_ssl_extension,
|
||||
- ],
|
||||
- package_dir = {'nss':'src'},
|
||||
- packages = ['nss'],
|
||||
- cmdclass = {'build_doc' : BuildDoc,
|
||||
- 'install_doc' : InstallDoc,
|
||||
- 'build_py' : BuildPy,
|
||||
- 'sdist' : SDist,
|
||||
- }
|
||||
- )
|
||||
-
|
||||
- return 0
|
||||
-
|
||||
-#------------------------------------------------------------------------------
|
||||
-
|
||||
-if __name__ == "__main__":
|
||||
- sys.exit(main(sys.argv))
|
||||
+with open('README') as f:
|
||||
+ long_description = f.read()
|
||||
+debug_compile_args = ['-O0', '-g']
|
||||
+extra_compile_args = []
|
||||
+include_roots = []
|
||||
+for arg in sys.argv[:]:
|
||||
+ if arg in ('--debug', ):
|
||||
+ print("compiling with debug")
|
||||
+ extra_compile_args += debug_compile_args
|
||||
+ sys.argv.remove(arg)
|
||||
+ if arg in ('-t', '--trace'):
|
||||
+ print("compiling with trace")
|
||||
+ extra_compile_args += ['-DDEBUG']
|
||||
+ sys.argv.remove(arg)
|
||||
+ if arg.startswith('--include-root'):
|
||||
+ include_roots.append(arg.split('--include-root=')[1])
|
||||
+ sys.argv.remove(arg)
|
||||
+nss_include_dir = find_include_dir(['nss3', 'nss'], ['nss.h', 'pk11pub.h'], include_roots=include_roots)
|
||||
+nspr_include_dir = find_include_dir(['nspr4', 'nspr'], ['nspr.h', 'prio.h'], include_roots=include_roots)
|
||||
+nss_error_extension = \
|
||||
+ Extension('nss.error',
|
||||
+ sources = ['src/py_nspr_error.c'],
|
||||
+ include_dirs = [nss_include_dir, nspr_include_dir],
|
||||
+ depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h',
|
||||
+ 'src/NSPRerrs.h', 'src/SSLerrs.h', 'src/SECerrs.h'],
|
||||
+ libraries = ['nspr4'],
|
||||
+ extra_compile_args = extra_compile_args,
|
||||
+ )
|
||||
+nss_io_extension = \
|
||||
+ Extension('nss.io',
|
||||
+ sources = ['src/py_nspr_io.c'],
|
||||
+ include_dirs = [nss_include_dir, nspr_include_dir],
|
||||
+ depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h', 'src/py_nspr_io.h'],
|
||||
+ libraries = ['nspr4'],
|
||||
+ extra_compile_args = extra_compile_args,
|
||||
+ )
|
||||
+nss_nss_extension = \
|
||||
+ Extension('nss.nss',
|
||||
+ sources = ['src/py_nss.c'],
|
||||
+ include_dirs = ['src', nss_include_dir, nspr_include_dir],
|
||||
+ depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h', 'src/py_nss.h'],
|
||||
+ libraries = ['nspr4', 'ssl3', 'nss3', 'smime3'],
|
||||
+ extra_compile_args = extra_compile_args,
|
||||
+ )
|
||||
+nss_ssl_extension = \
|
||||
+ Extension('nss.ssl',
|
||||
+ sources = ['src/py_ssl.c'],
|
||||
+ include_dirs = ['src', nss_include_dir, nspr_include_dir],
|
||||
+ depends = ['src/py_nspr_common.h', 'src/py_nspr_error.h', 'src/py_nspr_io.h',
|
||||
+ 'src/py_ssl.h', 'src/py_nss.h'],
|
||||
+ libraries = ['nspr4', 'ssl3'],
|
||||
+ extra_compile_args = extra_compile_args,
|
||||
+ )
|
||||
+ #bug_tracker = 'https://bugzilla.redhat.com/buglist.cgi?submit&component=python-nss&product=Fedora&classification=Fedora'
|
||||
+ #bug_enter = 'https://bugzilla.redhat.com/enter_bug.cgi?component=python-nss&product=Fedora&classification=Fedora',
|
||||
+
|
||||
+setup(name = name,
|
||||
+ version = version,
|
||||
+ description = 'Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)',
|
||||
+ long_description = long_description,
|
||||
+ author = 'John Dennis',
|
||||
+ author_email = 'jdennis@redhat.com',
|
||||
+ maintainer = 'John Dennis',
|
||||
+ maintainer_email = 'jdennis@redhat.com',
|
||||
+ license = 'MPLv2.0 or GPLv2+ or LGPLv2+',
|
||||
+ platforms = 'posix',
|
||||
+ url = 'http://www.mozilla.org/projects/security/pki/python-nss',
|
||||
+ download_url = '',
|
||||
+ ext_modules = [nss_error_extension,
|
||||
+ nss_io_extension,
|
||||
+ nss_nss_extension,
|
||||
+ nss_ssl_extension,
|
||||
+ ],
|
||||
+ package_dir = {'nss':'src'},
|
||||
+ packages = ['nss'],
|
||||
+ cmdclass = {'build_doc' : BuildDoc,
|
||||
+ 'install_doc' : InstallDoc,
|
||||
+ 'build_py' : BuildPy,
|
||||
+ 'sdist' : SDist,
|
||||
+ }
|
||||
+)
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 15:24:39 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Add fix-ftbfs-python3-12.patch from
|
||||
https://bugs.debian.org/1055552 to fix FTBFS with Python 3.12
|
||||
(bsc#1219842).
|
||||
- Update new-setuptools.patch to make setup.py more compatible
|
||||
with the current setuptools.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 22 08:19:27 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-nss
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# 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
|
||||
@@ -34,10 +34,15 @@ Patch1: sphinx.patch
|
||||
Patch2: new-setuptools.patch
|
||||
# PATCH-FIX-OPENSUSE Stop using six in tests
|
||||
Patch3: remove-six.patch
|
||||
# PATCH-FIX-UPSTREAM fix-ftbfs-python3-12.patch bsc#1219842 mcepl@suse.com
|
||||
# Patch from https://bugs.debian.org/1055552
|
||||
Patch4: fix-ftbfs-python3-12.patch
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module docutils}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: mozilla-nspr-devel
|
||||
BuildRequires: mozilla-nss-devel
|
||||
@@ -65,10 +70,10 @@ HTML Documentation and examples for %name.
|
||||
%autosetup -p1 -n python-nss-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
PYTHONPATH=%{buildroot}%{python_sitearch} python3 -m sphinx doc/sphinx/source build/sphinx/html
|
||||
rm -rf build/sphinx/html/.buildinfo build/sphinx/html/.doctrees
|
||||
@@ -82,7 +87,7 @@ $python test/run_tests -i
|
||||
%license LICENSE.mpl LICENSE.lgpl LICENSE.gpl
|
||||
%doc README doc/ChangeLog
|
||||
%{python_sitearch}/nss
|
||||
%{python_sitearch}/python_nss-%{version}*info
|
||||
%{python_sitearch}/python_nss-%{version}*-info
|
||||
|
||||
%files -n %{name}-doc
|
||||
%license LICENSE.mpl LICENSE.lgpl LICENSE.gpl
|
||||
|
||||
Reference in New Issue
Block a user