forked from pool/python-python-crfsuite
Accepting request 1245647 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1245647 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-crfsuite?expand=0&rev=7
This commit is contained in:
28
159.patch
28
159.patch
@@ -1,28 +0,0 @@
|
|||||||
From df2857fff3c492692ca09f31699972970042bc07 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Karcher <github@mkarcher.dialup.fu-berlin.de>
|
|
||||||
Date: Wed, 12 Jun 2024 22:42:45 +0200
|
|
||||||
Subject: [PATCH] Define _POSIX_C_SOURCE for crfsuite source files
|
|
||||||
|
|
||||||
gcc-14 has "-Werror=implicit-function-declaration" enabled by default.
|
|
||||||
crfsuite uses posix_memalign which only gets defined when _POSIX_C_SOURCE is
|
|
||||||
defined, so make sure the flag is set when compiling crfsuite.
|
|
||||||
|
|
||||||
On the other hand, openSUSE Tumbleweed has _POSIX_C_SOURCE defined
|
|
||||||
in pyconfig.h, so you must not add "-D_POSIX_C_SOURCE" when compiling
|
|
||||||
the python binding source code. So add it only for the subdir crfsuite.
|
|
||||||
---
|
|
||||||
setup.py | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 8036363..f0dc370 100755
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -30,6 +30,7 @@ def build_extensions(self):
|
|
||||||
_compile = c._compile
|
|
||||||
|
|
||||||
def c_compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
|
|
||||||
+ cc_args = cc_args + ['-D_POSIX_C_SOURCE=200112L'] if src.startswith('crfsuite/') else cc_args
|
|
||||||
cc_args = cc_args + ['-std=c99'] if src.endswith('.c') else cc_args
|
|
||||||
return _compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
|
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f38524631e2b533341f10f2c77689270dc6ecd5985495dccf7aa37b1045bc2e5
|
|
||||||
size 478262
|
|
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 12 15:21:50 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 0.9.11
|
||||||
|
* Cleaned up install
|
||||||
|
* Unicode allowed
|
||||||
|
* Compiling on additional platforms
|
||||||
|
- Add Cython to BuildRequires
|
||||||
|
- Adjust upstream source name in spec file
|
||||||
|
- Drop 159.patch, merged upstream
|
||||||
|
- Exclude C++ source and header files in %files section
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 12 21:37:57 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Wed Jun 12 21:37:57 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-python-crfsuite
|
# spec file for package python-python-crfsuite
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-python-crfsuite
|
Name: python-python-crfsuite
|
||||||
Version: 0.9.10
|
Version: 0.9.11
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python binding for CRFsuite
|
Summary: Python binding for CRFsuite
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/scrapinghub/python-crfsuite
|
URL: https://github.com/scrapinghub/python-crfsuite
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/python-crfsuite/python-crfsuite-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/python_crfsuite/python_crfsuite-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM - Define _POSIX_C_SOURCE for crfsuite source files
|
BuildRequires: %{python_module Cython}
|
||||||
Patch: https://github.com/scrapinghub/python-crfsuite/pull/159.patch
|
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@@ -39,7 +38,7 @@ BuildRequires: python-rpm-macros
|
|||||||
Python-crfsuite is a python binding to CRFsuite_.
|
Python-crfsuite is a python binding to CRFsuite_.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n python-crfsuite-%{version}
|
%autosetup -p1 -n python_crfsuite-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
@@ -58,6 +57,8 @@ mv bak pycrfsuite
|
|||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc CHANGES.rst README.rst
|
%doc CHANGES.rst README.rst
|
||||||
%{python_sitearch}/pycrfsuite
|
%{python_sitearch}/pycrfsuite
|
||||||
|
%exclude %{python_sitearch}/pycrfsuite/*.cpp
|
||||||
|
%exclude %{python_sitearch}/pycrfsuite/*.hpp
|
||||||
%{python_sitearch}/python_crfsuite-%{version}*-info
|
%{python_sitearch}/python_crfsuite-%{version}*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
3
python_crfsuite-0.9.11.tar.gz
Normal file
3
python_crfsuite-0.9.11.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6eff965ca70567396d822c9a35ea74b0f7edb27d9471524997bdabe7a6da5f5a
|
||||||
|
size 477721
|
Reference in New Issue
Block a user