14
0
forked from pool/python-ujson
Files
python-ujson/python-ujson.spec

66 lines
1.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-ujson
#
# Copyright (c) 2023 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-ujson
Version: 5.7.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}
Accepting request 783435 from home:pgajdos:python - version update to 2.0.1 Added Include license file in manifest (#288) @kszucs added "static" to C functions, where possible (#238) @WGH- bring back benchmark introduction (#234) @rdpate Add syntax highlighting to README (#255) @adamchainz Test on new Travis CPUs (#350) @hugovk Test on GitHub Actions (#348) @hugovk Test on Python 3.9-dev to avoid surprises (#349) @hugovk Use Release Drafter to draft releases (#365) @hugovk Deploy from GitHub Actions instead of Travis CI (#364) @hugovk Autodeploy to PyPI from Travis CI (#357) @hugovk Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk Changed Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja Reduce default buffer on stack size (#281) @ncopa Update ultrajsondec.c (#260) @markpiekarz Indent dict values (#217) @orivej Test with pytest (#363) @hugovk Less Travis (#361) @hugovk Update links (#356) @hugovk Tests: Remove unused, unmaintained blist (#362) @hugovk Only deploy sdist from Travis CI (#359) @hugovk Removed Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk Remove serialization of date/datetime objects (50181f0) @Jahaja Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja Remove generic serialization of objects/iterables (53f85b1) @Jahaja Remove support for __json__ method on str (5f98f01) @Jahaja Remove blist tests (3a6ba52) @Jahaja OBS-URL: https://build.opensuse.org/request/show/783435 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=15
2020-03-10 14:38:08 +00:00
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
Accepting request 783435 from home:pgajdos:python - version update to 2.0.1 Added Include license file in manifest (#288) @kszucs added "static" to C functions, where possible (#238) @WGH- bring back benchmark introduction (#234) @rdpate Add syntax highlighting to README (#255) @adamchainz Test on new Travis CPUs (#350) @hugovk Test on GitHub Actions (#348) @hugovk Test on Python 3.9-dev to avoid surprises (#349) @hugovk Use Release Drafter to draft releases (#365) @hugovk Deploy from GitHub Actions instead of Travis CI (#364) @hugovk Autodeploy to PyPI from Travis CI (#357) @hugovk Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk Changed Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja Reduce default buffer on stack size (#281) @ncopa Update ultrajsondec.c (#260) @markpiekarz Indent dict values (#217) @orivej Test with pytest (#363) @hugovk Less Travis (#361) @hugovk Update links (#356) @hugovk Tests: Remove unused, unmaintained blist (#362) @hugovk Only deploy sdist from Travis CI (#359) @hugovk Removed Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk Remove serialization of date/datetime objects (50181f0) @Jahaja Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja Remove generic serialization of objects/iterables (53f85b1) @Jahaja Remove support for __json__ method on str (5f98f01) @Jahaja Remove blist tests (3a6ba52) @Jahaja OBS-URL: https://build.opensuse.org/request/show/783435 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=15
2020-03-10 14:38:08 +00:00
BuildRequires: double-conversion-devel
BuildRequires: fdupes
Accepting request 783435 from home:pgajdos:python - version update to 2.0.1 Added Include license file in manifest (#288) @kszucs added "static" to C functions, where possible (#238) @WGH- bring back benchmark introduction (#234) @rdpate Add syntax highlighting to README (#255) @adamchainz Test on new Travis CPUs (#350) @hugovk Test on GitHub Actions (#348) @hugovk Test on Python 3.9-dev to avoid surprises (#349) @hugovk Use Release Drafter to draft releases (#365) @hugovk Deploy from GitHub Actions instead of Travis CI (#364) @hugovk Autodeploy to PyPI from Travis CI (#357) @hugovk Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk Changed Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja Reduce default buffer on stack size (#281) @ncopa Update ultrajsondec.c (#260) @markpiekarz Indent dict values (#217) @orivej Test with pytest (#363) @hugovk Less Travis (#361) @hugovk Update links (#356) @hugovk Tests: Remove unused, unmaintained blist (#362) @hugovk Only deploy sdist from Travis CI (#359) @hugovk Removed Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk Remove serialization of date/datetime objects (50181f0) @Jahaja Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja Remove generic serialization of objects/iterables (53f85b1) @Jahaja Remove support for __json__ method on str (5f98f01) @Jahaja Remove blist tests (3a6ba52) @Jahaja OBS-URL: https://build.opensuse.org/request/show/783435 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=15
2020-03-10 14:38:08 +00:00
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.5+
%prep
%setup -q -n ujson-%{version}
%autopatch -p1
%build
Accepting request 783435 from home:pgajdos:python - version update to 2.0.1 Added Include license file in manifest (#288) @kszucs added "static" to C functions, where possible (#238) @WGH- bring back benchmark introduction (#234) @rdpate Add syntax highlighting to README (#255) @adamchainz Test on new Travis CPUs (#350) @hugovk Test on GitHub Actions (#348) @hugovk Test on Python 3.9-dev to avoid surprises (#349) @hugovk Use Release Drafter to draft releases (#365) @hugovk Deploy from GitHub Actions instead of Travis CI (#364) @hugovk Autodeploy to PyPI from Travis CI (#357) @hugovk Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk Changed Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja Reduce default buffer on stack size (#281) @ncopa Update ultrajsondec.c (#260) @markpiekarz Indent dict values (#217) @orivej Test with pytest (#363) @hugovk Less Travis (#361) @hugovk Update links (#356) @hugovk Tests: Remove unused, unmaintained blist (#362) @hugovk Only deploy sdist from Travis CI (#359) @hugovk Removed Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk Remove serialization of date/datetime objects (50181f0) @Jahaja Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja Remove generic serialization of objects/iterables (53f85b1) @Jahaja Remove support for __json__ method on str (5f98f01) @Jahaja Remove blist tests (3a6ba52) @Jahaja OBS-URL: https://build.opensuse.org/request/show/783435 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=15
2020-03-10 14:38:08 +00:00
rm -r deps
export CFLAGS="%{optflags} -fno-strict-aliasing"
export UJSON_BUILD_DC_INCLUDES='%{_includedir}/double-conversion'
Accepting request 979169 from home:gosipyan:branches:devel:languages:python - update to version 5.3.0 * Test Python 3.11 beta (#539) @hugovk * Benchmark refactor - argparse CLI (#533) @Erotemic * Fix segmentation faults when errors occur while handling unserialisable objects (#531) @JustAnotherArchivist * Fix segmentation fault when an exception is raised while converting a dict key to a string (#526) @JustAnotherArchivist * Fix memory leak dumping on non-string dict keys (#521) @JustAnotherArchivist * Fix ref counting on repeated default function calls (#524) @JustAnotherArchivist * Remove redundant wheel dependency from pyproject.toml (#535) @hugovk - Release 5.2.0 * Support parsing NaN, Infinity and -Infinity (#514) @Erotemic * Support dynamically linking against system double-conversion library (#508) @musicinmybrain * Add env var to control stripping debug info (#507) @musicinmybrain * Add JSONDecodeError (#498) @JustAnotherArchivist * Fix buffer overflows (CVE-2021-45958) (#519) @JustAnotherArchivist * Upgrade Black to fix Click (#515) @hugovk * simplify exception handling on integer overflow (#510) @RouquinBlanc * Remove dead code that used to handle the separate int type in Python 2 (#509) @JustAnotherArchivist * Fix exceptions on encoding list or dict elements and non-overflow errors on int handling getting silenced (#505) @JustAnotherArchivist - Release 5.1.0 * Strip debugging symbols from Linux binaries (#493) @bwoodsend - Release 5.0.0 * Use cibuildwheel to build wheels (#491) @bwoodsend * Drop support for soon-EOL Python 3.6 (#490) @hugovk * Install Twine to upload to PyPI (#492) @hugovk - Remove python-ujson-system-double-conversion.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/979169 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=30
2022-05-25 12:24:16 +00:00
export UJSON_BUILD_DC_LIBS='-ldouble-conversion'
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
Accepting request 783435 from home:pgajdos:python - version update to 2.0.1 Added Include license file in manifest (#288) @kszucs added "static" to C functions, where possible (#238) @WGH- bring back benchmark introduction (#234) @rdpate Add syntax highlighting to README (#255) @adamchainz Test on new Travis CPUs (#350) @hugovk Test on GitHub Actions (#348) @hugovk Test on Python 3.9-dev to avoid surprises (#349) @hugovk Use Release Drafter to draft releases (#365) @hugovk Deploy from GitHub Actions instead of Travis CI (#364) @hugovk Autodeploy to PyPI from Travis CI (#357) @hugovk Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk Changed Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja Reduce default buffer on stack size (#281) @ncopa Update ultrajsondec.c (#260) @markpiekarz Indent dict values (#217) @orivej Test with pytest (#363) @hugovk Less Travis (#361) @hugovk Update links (#356) @hugovk Tests: Remove unused, unmaintained blist (#362) @hugovk Only deploy sdist from Travis CI (#359) @hugovk Removed Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk Remove serialization of date/datetime objects (50181f0) @Jahaja Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja Remove generic serialization of objects/iterables (53f85b1) @Jahaja Remove support for __json__ method on str (5f98f01) @Jahaja Remove blist tests (3a6ba52) @Jahaja OBS-URL: https://build.opensuse.org/request/show/783435 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=15
2020-03-10 14:38:08 +00:00
%pytest_arch
%files %{python_files}
%doc README.md
%{python_sitearch}/ujson.*
%{python_sitearch}/ujson-%{version}*-info
%changelog