Sync from SUSE:SLFO:Main python-ruamel.yaml.clib revision 40db49e37c65ef237f2c9ff720010239
This commit is contained in:
parent
ee24f175da
commit
2a4b9f5e77
85
0001-Fix-building-with-clang-16.patch
Normal file
85
0001-Fix-building-with-clang-16.patch
Normal file
@ -0,0 +1,85 @@
|
||||
From e5c10549aae59d317eaa6a19262e15221807100a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Levine <plevine457@gmail.com>
|
||||
Date: Thu, 1 Jun 2023 03:58:31 -0400
|
||||
Subject: [PATCH] Fix building with clang-16
|
||||
|
||||
---
|
||||
_ruamel_yaml.pxd | 18 +++++++++---------
|
||||
_ruamel_yaml.pyx | 4 ++--
|
||||
2 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/_ruamel_yaml.pxd
|
||||
+++ b/_ruamel_yaml.pxd
|
||||
@@ -2,15 +2,15 @@
|
||||
cdef extern from "_ruamel_yaml.h":
|
||||
|
||||
void malloc(int l)
|
||||
- void memcpy(char *d, char *s, int l)
|
||||
+ void memcpy(unsigned char *d, char *s, int l)
|
||||
int strlen(char *s)
|
||||
int PyString_CheckExact(object o)
|
||||
int PyUnicode_CheckExact(object o)
|
||||
char *PyString_AS_STRING(object o)
|
||||
int PyString_GET_SIZE(object o)
|
||||
- object PyString_FromStringAndSize(char *v, int l)
|
||||
+ object PyString_FromStringAndSize(unsigned char *v, size_t l)
|
||||
object PyUnicode_FromString(char *u)
|
||||
- object PyUnicode_DecodeUTF8(char *u, int s, char *e)
|
||||
+ object PyUnicode_DecodeUTF8(unsigned char *u, size_t s, char *e)
|
||||
object PyUnicode_AsUTF8String(object o)
|
||||
int PY_MAJOR_VERSION
|
||||
|
||||
@@ -85,11 +85,11 @@ cdef extern from "_ruamel_yaml.h":
|
||||
YAML_MAPPING_START_EVENT
|
||||
YAML_MAPPING_END_EVENT
|
||||
|
||||
- ctypedef int yaml_read_handler_t(void *data, char *buffer,
|
||||
- int size, int *size_read) except 0
|
||||
+ ctypedef int yaml_read_handler_t(void *data, unsigned char *buffer,
|
||||
+ size_t size, size_t *size_read) except 0
|
||||
|
||||
- ctypedef int yaml_write_handler_t(void *data, char *buffer,
|
||||
- int size) except 0
|
||||
+ ctypedef int yaml_write_handler_t(void *data, unsigned char *buffer,
|
||||
+ size_t size) except 0
|
||||
|
||||
ctypedef struct yaml_mark_t:
|
||||
int index
|
||||
@@ -112,7 +112,7 @@ cdef extern from "_ruamel_yaml.h":
|
||||
char *handle
|
||||
char *suffix
|
||||
ctypedef struct _yaml_token_scalar_data_t:
|
||||
- char *value
|
||||
+ unsigned char *value
|
||||
int length
|
||||
yaml_scalar_style_t style
|
||||
ctypedef struct _yaml_token_version_directive_data_t:
|
||||
@@ -151,7 +151,7 @@ cdef extern from "_ruamel_yaml.h":
|
||||
ctypedef struct _yaml_event_scalar_data_t:
|
||||
char *anchor
|
||||
char *tag
|
||||
- char *value
|
||||
+ unsigned char *value
|
||||
int length
|
||||
int plain_implicit
|
||||
int quoted_implicit
|
||||
--- a/_ruamel_yaml.pyx
|
||||
+++ b/_ruamel_yaml.pyx
|
||||
@@ -904,7 +904,7 @@ cdef class CParser:
|
||||
raise error
|
||||
return 1
|
||||
|
||||
-cdef int input_handler(void *data, char *buffer, int size, int *read) except 0:
|
||||
+cdef int input_handler(void *data, unsigned char *buffer, size_t size, size_t *read) except 0:
|
||||
cdef CParser parser
|
||||
parser = <CParser>data
|
||||
if parser.stream_cache is None:
|
||||
@@ -1514,7 +1514,7 @@ cdef class CEmitter:
|
||||
self.ascend_resolver()
|
||||
return 1
|
||||
|
||||
-cdef int output_handler(void *data, char *buffer, int size) except 0:
|
||||
+cdef int output_handler(void *data, unsigned char *buffer, size_t size) except 0:
|
||||
cdef CEmitter emitter
|
||||
emitter = <CEmitter>data
|
||||
if emitter.dump_unicode == 0:
|
14
_service
Normal file
14
_service
Normal file
@ -0,0 +1,14 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="manual">
|
||||
<param name="versionprefix">0.2.8+hg</param>
|
||||
<param name="url">http://hg.code.sf.net/p/ruamel-yaml-clib/code</param>
|
||||
<param name="scm">hg</param>
|
||||
<param name="exclude">.hg*</param>
|
||||
<param name="filename">ruamel-yaml-clib</param>
|
||||
</service>
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual" />
|
||||
</services>
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 6 12:50:31 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch to getting source code from the Mercurial tip 0.2.8+hg.44
|
||||
- Add 0001-Fix-building-with-clang-16.patch fixing bsc#1221017
|
||||
compile with GCC 14.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 4 08:11:44 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 0.2.8
|
||||
* regenerated with Cython 3.0.2 for Python 3.12
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:33:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-ruamel.yaml.clib
|
||||
#
|
||||
# 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
|
||||
@ -16,18 +16,24 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?sle15_python_module_pythons}
|
||||
%define relver 0.2.8
|
||||
Name: python-ruamel.yaml.clib
|
||||
Version: 0.2.7
|
||||
Version: 0.2.8+hg.44
|
||||
Release: 0
|
||||
Summary: Python YAML parser c-library
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://bitbucket.org/ruamel/yaml.clib
|
||||
Source: https://files.pythonhosted.org/packages/source/r/ruamel.yaml.clib/ruamel.yaml.clib-%{version}.tar.gz
|
||||
# Source: https://files.pythonhosted.org/packages/source/r/ruamel.yaml.clib/ruamel.yaml.clib-%%{version}.tar.gz
|
||||
Source: ruamel-yaml-clib-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM 0001-Fix-building-with-clang-16.patch bsc#1221017 mcepl@suse.com
|
||||
# Fix incompatible function pointer types
|
||||
Patch0: 0001-Fix-building-with-clang-16.patch
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools >= 28.7.0}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%python_subpackages
|
||||
@ -38,21 +44,33 @@ of comments, seq/map flow style, and map key order.
|
||||
This package contains the C library counterpart of it.
|
||||
|
||||
%prep
|
||||
%setup -q -n ruamel.yaml.clib-%{version}
|
||||
%autosetup -p1 -n ruamel-yaml-clib-%{version}
|
||||
|
||||
rm -v $(grep -rl '/\* Generated by Cython')
|
||||
rm -rf *egg-info
|
||||
|
||||
%build
|
||||
%python_build
|
||||
# cython refuses to cythonize a file in a directory that cannot be a Python
|
||||
# module ¯\_(ツ)_/¯
|
||||
#
|
||||
# Top-level structure seems to be incompatible with Cython 0.29.34
|
||||
# ('ruamel-yaml-clib-code._ruamel_yaml' is not a valid module name)
|
||||
# https://sourceforge.net/p/ruamel-yaml-clib/tickets/14/
|
||||
mkdir ruamel.yaml.clib
|
||||
mv *.pyx ruamel.yaml.clib
|
||||
cythonize -3 ruamel.yaml.clib/*.pyx
|
||||
mv ruamel.yaml.clib/* .
|
||||
rmdir ruamel.yaml.clib
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install --single-version-externally-managed
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python_sitearch}/_ruamel_yaml*.so
|
||||
%{python_sitearch}/ruamel
|
||||
%{python_sitearch}/ruamel.yaml.clib-%{version}-py%{python_version}.egg-info
|
||||
%{python_sitearch}/ruamel.yaml.clib-%{relver}*-info
|
||||
|
||||
%changelog
|
||||
|
BIN
ruamel-yaml-clib-0.2.8+hg.44.tar.gz
(Stored with Git LFS)
Normal file
BIN
ruamel-yaml-clib-0.2.8+hg.44.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ruamel.yaml.clib-0.2.7.tar.gz
(Stored with Git LFS)
BIN
ruamel.yaml.clib-0.2.7.tar.gz
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user