forked from pool/python39
Accepting request 915024 from home:mcepl:python-libmpdec
- Add decimal.patch to add building with --with-system-libmpdec option (bsc#1189356). OBS-URL: https://build.opensuse.org/request/show/915024 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python39?expand=0&rev=82
This commit is contained in:
33
decimal.patch
Normal file
33
decimal.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
diff -ur a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
|
||||
--- a/Modules/_decimal/_decimal.c 2021-02-19 13:31:44.000000000 +0100
|
||||
+++ b/Modules/_decimal/_decimal.c 2021-02-21 10:25:28.240876775 +0100
|
||||
@@ -3280,7 +3280,7 @@
|
||||
}
|
||||
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) {
|
||||
@@ -3289,7 +3289,7 @@
|
||||
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) {
|
||||
diff -ur a/setup.py b/setup.py
|
||||
--- a/setup.py 2021-02-19 13:31:44.000000000 +0100
|
||||
+++ b/setup.py 2021-02-21 10:25:28.240876775 +0100
|
||||
@@ -2196,7 +2196,7 @@
|
||||
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:
|
||||
Reference in New Issue
Block a user