forked from pool/python-ujson
- Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=53
This commit is contained in:
66
python-ujson.spec
Normal file
66
python-ujson.spec
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# spec file for package python-ujson
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-ujson
|
||||
Version: 5.10.0
|
||||
Release: 0
|
||||
Summary: JSON encoder and decoder for Python
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/esnme/ultrajson
|
||||
Source: https://files.pythonhosted.org/packages/source/u/ujson/ujson-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python-rpm-macros
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
An ultrafast JSON encoder and decoder written in pure C with
|
||||
bindings for Python 2.7 and 3.8+
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ujson-%{version}
|
||||
|
||||
%build
|
||||
rm -r deps
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
export UJSON_BUILD_DC_INCLUDES='%{_includedir}/double-conversion'
|
||||
export UJSON_BUILD_DC_LIBS='-ldouble-conversion'
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
%pytest_arch
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%{python_sitearch}/ujson.cpython-*-linux-gnu.so
|
||||
%{python_sitearch}/ujson-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user