Accepting request 914696 from home:mcepl:python-libmpdec
- Add decimal-3.8.patch to add building with --with-system-libmpdec option (bsc#1189356). OBS-URL: https://build.opensuse.org/request/show/914696 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python38?expand=0&rev=79
This commit is contained in:
parent
24200752c4
commit
db054e258d
36
decimal-3.8.patch
Normal file
36
decimal-3.8.patch
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
Modules/_decimal/_decimal.c | 4 ++--
|
||||
setup.py | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/Modules/_decimal/_decimal.c
|
||||
+++ b/Modules/_decimal/_decimal.c
|
||||
@@ -3284,7 +3284,7 @@ dec_format(PyObject *dec, PyObject *args
|
||||
}
|
||||
else {
|
||||
size_t n = strlen(spec.dot);
|
||||
- if (n > 1 || (n == 1 && !isascii((uchar)spec.dot[0]))) {
|
||||
+ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.dot[0]))) {
|
||||
/* fix locale dependent non-ascii characters */
|
||||
dot = dotsep_as_utf8(spec.dot);
|
||||
if (dot == NULL) {
|
||||
@@ -3293,7 +3293,7 @@ dec_format(PyObject *dec, PyObject *args
|
||||
spec.dot = PyBytes_AS_STRING(dot);
|
||||
}
|
||||
n = strlen(spec.sep);
|
||||
- if (n > 1 || (n == 1 && !isascii((uchar)spec.sep[0]))) {
|
||||
+ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.sep[0]))) {
|
||||
/* fix locale dependent non-ascii characters */
|
||||
sep = dotsep_as_utf8(spec.sep);
|
||||
if (sep == NULL) {
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2051,7 +2051,7 @@ class PyBuildExt(build_ext):
|
||||
undef_macros = []
|
||||
if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
|
||||
include_dirs = []
|
||||
- libraries = [':libmpdec.so.2']
|
||||
+ libraries = ['mpdec']
|
||||
sources = ['_decimal/_decimal.c']
|
||||
depends = ['_decimal/docstrings.h']
|
||||
else:
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 27 12:00:12 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add decimal-3.8.patch to add building with --with-system-libmpdec
|
||||
option (bsc#1189356).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 26 12:00:25 UTC 2021 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
|
@ -75,6 +75,12 @@
|
||||
%if "%{_arch}" == "arm"
|
||||
%define armsuffix hf
|
||||
%endif
|
||||
# Decide whether we want to use mpdecimal
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%bcond_without mpdecimal
|
||||
%else
|
||||
%bcond_with mpdecimal
|
||||
%endif
|
||||
# pyexpat.cpython-35m-x86_64-linux-gnu
|
||||
# pyexpat.cpython-35m-powerpc64le-linux-gnu
|
||||
# pyexpat.cpython-35m-armv7-linux-gnueabihf
|
||||
@ -120,6 +126,10 @@ Patch03: SUSE-FEDORA-multilib.patch
|
||||
# PATCH-FEATURE-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com
|
||||
# Improve reproduceability
|
||||
Patch06: distutils-reproducible-compile.patch
|
||||
# PATCH-FEATURE-UPSTREAM decimal-3.8.patch bsc#1189356 mcepl@suse.com
|
||||
# fix building with mpdecimal
|
||||
# https://www.bytereef.org/contrib/decimal-3.8.diff
|
||||
Patch05: decimal-3.8.patch
|
||||
# support finding packages in /usr/local, install to /usr/local by default
|
||||
Patch07: python-3.3.0b1-localpath.patch
|
||||
# replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds
|
||||
@ -169,6 +179,9 @@ BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: pkgconfig(libnsl)
|
||||
BuildRequires: pkgconfig(libtirpc)
|
||||
%endif
|
||||
%if %{with mpdecimal}
|
||||
BuildRequires: mpdecimal-devel
|
||||
%endif
|
||||
%if %{with doc}
|
||||
%if 0%{?suse_version} > 1500
|
||||
BuildRequires: %{python_pkg_name}-Sphinx
|
||||
@ -388,6 +401,9 @@ other applications.
|
||||
%if "%{_lib}" == "lib64"
|
||||
%patch03 -p1
|
||||
%endif
|
||||
%if %{with mpdecimal}
|
||||
%patch05 -p1
|
||||
%endif
|
||||
|
||||
%patch06 -p1
|
||||
%patch07 -p1
|
||||
@ -459,6 +475,9 @@ sed -e 's/-fprofile-correction//' -i Makefile.pre.in
|
||||
--with-lto \
|
||||
%if %{with profileopt}
|
||||
--enable-optimizations \
|
||||
%endif
|
||||
%if %{with mpdecimal}
|
||||
--with-system-libmpdec \
|
||||
%endif
|
||||
--enable-loadable-sqlite-extensions
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user