forked from pool/python-python-crfsuite
Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 286663fc12 | |||
| 0531bbf680 | |||
| 58d71f1670 | |||
| 3f99dc4841 | |||
| 044590745f | |||
| 9eff96ec06 |
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,126 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 27 07:09:19 UTC 2026 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 0.9.12:
|
||||||
|
* Dropped support for Python 3.6, 3.7, 3.8, 3.9.
|
||||||
|
* Added support for Python 3.12, 3.13, 3.14.
|
||||||
|
* Python 3.11 Support
|
||||||
|
* Python 3.4 is no longer supported (it may work, but CI is
|
||||||
|
disabled)
|
||||||
|
* Python 3.8 support
|
||||||
|
* fixed installation issues on OS X (thanks @kvinwang)
|
||||||
|
* make it easier for distributions to have a reproducible build
|
||||||
|
(thanks @bmwiedemann)
|
||||||
|
* Python 3.7 support (thanks @fgregg, @danmacnaughtan and
|
||||||
|
@fuhrysteve).
|
||||||
|
* Python 3.3 support is dropped.
|
||||||
|
* new Tagger.open_inmemory method which allows to load tagger
|
||||||
|
data without having a file on-disk (thanks @lucywang000).
|
||||||
|
* license information is added to setup.py (thanks @nils-
|
||||||
|
werner).
|
||||||
|
* Python 3.6 wheels for Windows (thanks @fgregg).
|
||||||
|
* Packaging fix (thanks @fgregg).
|
||||||
|
* Fixed compatibility with Python 3.5+ on Windows (thanks
|
||||||
|
@fgregg);
|
||||||
|
* CRFSuite C++ library is updated to latest version, this fixes
|
||||||
|
several memory leaks and improves performance (thanks
|
||||||
|
@fgregg);
|
||||||
|
* extension is rebuilt with Cython 0.26.1.
|
||||||
|
* binary wheels for OS X and Linux (thanks @jeancochrane).
|
||||||
|
* Repository is moved to https://github.com/scrapinghub/python-
|
||||||
|
crfsuite;
|
||||||
|
* We're now providing Windows wheels for Python 2.7, 3.3. and
|
||||||
|
3.4.
|
||||||
|
* Python 2.6 support is dropped;
|
||||||
|
* CRFSuite C++ library is updated to a more recent commit;
|
||||||
|
* improved Windows support (thanks @fgregg);
|
||||||
|
* fixed building with gcc < 5.0.0 (thanks @kantan2015);
|
||||||
|
* extension is rebuilt with Cython 0.25.1; this improves PyPy
|
||||||
|
compatibility (but we're not quite there yet).
|
||||||
|
* docs: trainer.logparser example is added to the notebook
|
||||||
|
(thanks @samgalen).
|
||||||
|
* the wrapper is rebuilt with Cython 0.23.4;
|
||||||
|
* declared Python 3.5 compatibility;
|
||||||
|
* fixed an issue with feature names ending with white spaces.
|
||||||
|
* fix build on Windows. (thanks @fgregg)
|
||||||
|
* memory leak is fixed by updating the bundled CRFsuite C++
|
||||||
|
library;
|
||||||
|
* the wrapper is rebuilt with Cython 0.21.2.
|
||||||
|
* fix packaging issues with 0.8 release.
|
||||||
|
* :class:`~ItemSequence` wrapper is added;
|
||||||
|
* tox tests are fixed.
|
||||||
|
* More data formats for xseq: {"prefix": {feature_dict}} and
|
||||||
|
{"key": set(["key1",...])} feature dicts are now accepted by
|
||||||
|
:class:`pycrfsuite.Trainer` and :class:`pycrfsuite.Tagger`;
|
||||||
|
* feature separator changed from "=" to ":" (it looks better in
|
||||||
|
case of multi-level features);
|
||||||
|
* small doc and README fixes.
|
||||||
|
* Switch to setuptools;
|
||||||
|
* wheels are uploaded to pypi for faster installation.
|
||||||
|
* More data formats for xseq: {"key": "value"} and {"key":
|
||||||
|
bool_value} feature dicts are now accepted by
|
||||||
|
:class:`pycrfsuite.Trainer` and :class:`pycrfsuite.Tagger`.
|
||||||
|
* Exceptions in logging message handlers are now propagated and
|
||||||
|
raised. This allows, for example, to stop training earlier by
|
||||||
|
pressing Ctrl-C.
|
||||||
|
* It is now possible to customize :class:`pycrfsuite.Trainer`
|
||||||
|
logging more easily by overriding the following methods:
|
||||||
|
:meth:`pycrfsuite.Trainer.on_start`,
|
||||||
|
:meth:`pycrfsuite.Trainer.on_featgen_progress`,
|
||||||
|
:meth:`pycrfsuite.Trainer.on_featgen_end`,
|
||||||
|
:meth:`pycrfsuite.Trainer.on_prepared`,
|
||||||
|
:meth:`pycrfsuite.Trainer.on_prepare_error`,
|
||||||
|
:meth:`pycrfsuite.Trainer.on_iteration`,
|
||||||
|
:meth:`pycrfsuite.Trainer.on_optimization_end`
|
||||||
|
:meth:`pycrfsuite.Trainer.on_end`. The feature is implemented
|
||||||
|
by parsing CRFsuite log. There is
|
||||||
|
:class:`pycrfsuite.BaseTrainer` that is not doing this.
|
||||||
|
* :meth:`pycrfsuite.Tagger.info()` is fixed.
|
||||||
|
* (backwards-incompatible) training parameters are now passed
|
||||||
|
using params argument of :class:`pycrfsuite.Trainer`
|
||||||
|
constructor instead of **kwargs;
|
||||||
|
* (backwards-incompatible) logging support is dropped;
|
||||||
|
* verbose argument for :class:`pycrfsuite.Trainer` constructor;
|
||||||
|
* :meth:`pycrfsuite.Trainer.get_params` and
|
||||||
|
:meth:`pycrfsuite.Trainer.set_params` for getting/setting
|
||||||
|
multiple training parameters at once;
|
||||||
|
* string handling in Python 3.x is fixed by rebuilding the
|
||||||
|
wrapper with Cython 0.21dev;
|
||||||
|
* algorithm names are normalized to support names used by
|
||||||
|
crfsuite console utility and documented in crfsuite manual;
|
||||||
|
* type conversion for training parameters is fixed:
|
||||||
|
feature.minfreq now works, and boolean arguments become
|
||||||
|
boolean.
|
||||||
|
* Trainer.append_stringslists and Trainer.append_dicts methods
|
||||||
|
are replaced with a single :meth:`pycrfsuite.Trainer.append`
|
||||||
|
method;
|
||||||
|
* Tagger.set_stringlists and Tagger.set_dicts methods are
|
||||||
|
removed in favor of :meth:`pycrfsuite.Tagger.set` method;
|
||||||
|
* feature_format arguments in :class:`pycrfsuite.Tagger`
|
||||||
|
methods and constructor are dropped.
|
||||||
|
* :meth:`pycrfsuite.Tagger.dump()` and
|
||||||
|
:meth:`pycrfsuite.Tagger.info()` methods for model debugging;
|
||||||
|
* a memory leak in Trainer is fixed (trainer instances were
|
||||||
|
never garbage collected);
|
||||||
|
* documentation and testing improvements.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 11 05:49:33 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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) 2026 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# 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,18 +18,18 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-python-crfsuite
|
Name: python-python-crfsuite
|
||||||
Version: 0.9.10
|
Version: 0.9.12
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python binding for CRFsuite
|
Summary: Python binding for CRFsuite
|
||||||
License: MIT
|
License: MIT
|
||||||
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 pip}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: c++_compiler
|
BuildRequires: c++_compiler
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -39,14 +39,14 @@ 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}"
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -58,6 +58,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
|
||||||
%{python_sitearch}/python_crfsuite-%{version}*-info
|
%exclude %{python_sitearch}/pycrfsuite/*.cpp
|
||||||
|
%exclude %{python_sitearch}/pycrfsuite/*.hpp
|
||||||
|
%{python_sitearch}/python_crfsuite-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
3
python_crfsuite-0.9.12.tar.gz
Normal file
3
python_crfsuite-0.9.12.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:db37fccc3bd8f0c49c28a7697ca79c89d67b3fd5bf119122866169240ac4c480
|
||||||
|
size 488298
|
||||||
Reference in New Issue
Block a user