forked from pool/python-ujson
Accepting request 491262 from home:TheBlackCat:branches:devel:languages:python
- Implement single-spec version - Fix source URL - Run tests - Add do_not_remove_build_directory_manually.patch This avoids deleting build directories that the single-spec macro system needs. OBS-URL: https://build.opensuse.org/request/show/491262 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=9
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-ujson
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,6 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_with tests
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-ujson
|
||||
Version: 1.35
|
||||
Release: 0
|
||||
@@ -23,10 +26,21 @@ Summary: JSON encoder and decoder for Python
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
Url: http://www.esn.me
|
||||
Source: https://pypi.io/packages/source/u/ujson/ujson-%{version}.tar.gz
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
Source: https://files.pythonhosted.org/packages/source/u/ujson/ujson-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM -- do_not_remove_build_directory_manually.patch -- https://github.com/esnme/ultrajson/issues/179
|
||||
Patch0: do_not_remove_build_directory_manually.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
%if %{with tests}
|
||||
BuildRequires: %{python_module blist}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: %{python_module pytz}
|
||||
BuildRequires: python-unittest2
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
UltraJSON is a JSON encoder and decoder written in pure C with
|
||||
@@ -35,16 +49,28 @@ decoder experience please checkout ujson4c_, based on UltraJSON.
|
||||
|
||||
%prep
|
||||
%setup -q -n ujson-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags}" python setup.py build
|
||||
export CFLAGS="%{optflags}"
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%files
|
||||
%if %{with tests}
|
||||
%check
|
||||
pushd tests
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||
$python tests.py
|
||||
}
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.rst
|
||||
%{python_sitearch}/*
|
||||
%{python_sitearch}/ujson.*
|
||||
%{python_sitearch}/ujson-%{version}-py*.egg-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user