2013-04-30 11:22:38 +00:00
|
|
|
#
|
2019-12-15 13:20:28 +00:00
|
|
|
# spec file for package python
|
2013-04-30 11:22:38 +00:00
|
|
|
#
|
2020-02-12 12:21:40 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2013-04-30 11:22:38 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 13:21:13 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-05-08 13:16:42 +00:00
|
|
|
#
|
2013-04-30 11:22:38 +00:00
|
|
|
|
|
|
|
|
2017-04-26 05:34:51 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-12-15 13:20:28 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
2020-02-12 12:21:40 +00:00
|
|
|
%bcond_without test
|
2019-12-15 13:20:28 +00:00
|
|
|
%else
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2020-02-12 12:21:40 +00:00
|
|
|
%define skip_python2 1
|
2019-12-15 13:20:28 +00:00
|
|
|
Name: python-construct%{?psuffix}
|
2020-02-12 12:21:40 +00:00
|
|
|
Version: 2.10.56
|
2013-04-30 11:22:38 +00:00
|
|
|
Release: 0
|
2017-08-26 17:09:05 +00:00
|
|
|
Summary: A declarative parser/builder for binary data
|
2014-05-08 13:16:42 +00:00
|
|
|
License: MIT
|
2019-01-02 09:57:00 +00:00
|
|
|
URL: https://github.com/construct/construct
|
|
|
|
Source: https://github.com/construct/construct/archive/v%{version}.tar.gz
|
2019-01-11 09:56:50 +00:00
|
|
|
Patch0: split_debug.patch
|
2019-12-15 13:20:28 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-02-12 12:21:40 +00:00
|
|
|
Requires: python-arrow
|
|
|
|
Recommends: python-numpy
|
|
|
|
Recommends: python-ruamel.yaml
|
|
|
|
BuildArch: noarch
|
2019-12-15 13:20:28 +00:00
|
|
|
%if %{with test}
|
2019-01-02 09:57:00 +00:00
|
|
|
BuildRequires: %{python_module arrow}
|
2020-02-12 12:21:40 +00:00
|
|
|
BuildRequires: %{python_module numpy}
|
2019-01-02 09:57:00 +00:00
|
|
|
BuildRequires: %{python_module pytest-benchmark}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2020-02-12 12:21:40 +00:00
|
|
|
BuildRequires: %{python_module ruamel.yaml}
|
2019-01-02 09:57:00 +00:00
|
|
|
%endif
|
2017-04-26 05:34:51 +00:00
|
|
|
%python_subpackages
|
2013-04-30 11:22:38 +00:00
|
|
|
|
|
|
|
%description
|
2017-08-26 17:09:05 +00:00
|
|
|
Construct is a declarative parser (and builder) for binary data.
|
2013-04-30 11:22:38 +00:00
|
|
|
|
2017-08-26 17:09:05 +00:00
|
|
|
Instead of writing imperative code to parse a piece of data, a data
|
|
|
|
structure that describes the data is declared. As this data structure is not
|
2018-12-04 17:11:33 +00:00
|
|
|
code, it can be used in one direction to parse data into Pythonic objects,
|
2017-08-26 17:09:05 +00:00
|
|
|
and in the other direction to convert ("build") objects into binary data.
|
2013-04-30 11:22:38 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n construct-%{version}
|
2019-01-11 09:56:50 +00:00
|
|
|
%patch0 -p1
|
|
|
|
|
2019-01-02 09:57:00 +00:00
|
|
|
# remove gallery tests that require in place stuff
|
|
|
|
rm -rf tests/gallery
|
|
|
|
rm -rf tests/deprecated_gallery
|
2013-04-30 11:22:38 +00:00
|
|
|
|
|
|
|
%build
|
2019-12-15 13:20:28 +00:00
|
|
|
%if %{without test}
|
2017-04-26 05:34:51 +00:00
|
|
|
%python_build
|
2019-12-15 13:20:28 +00:00
|
|
|
%endif
|
2013-04-30 11:22:38 +00:00
|
|
|
|
|
|
|
%install
|
2019-12-15 13:20:28 +00:00
|
|
|
%if %{without test}
|
2017-04-26 05:34:51 +00:00
|
|
|
%python_install
|
2019-10-14 11:40:38 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-12-15 13:20:28 +00:00
|
|
|
%endif
|
2013-04-30 11:22:38 +00:00
|
|
|
|
2019-01-02 09:57:00 +00:00
|
|
|
%check
|
2019-12-15 13:20:28 +00:00
|
|
|
%if %{with test}
|
2019-10-14 11:41:16 +00:00
|
|
|
%pytest
|
2019-12-15 13:20:28 +00:00
|
|
|
%endif
|
2019-01-02 09:57:00 +00:00
|
|
|
|
2019-12-15 13:20:28 +00:00
|
|
|
%if %{without test}
|
2017-04-26 05:34:51 +00:00
|
|
|
%files %{python_files}
|
2018-12-04 17:11:33 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2017-04-26 05:34:51 +00:00
|
|
|
%{python_sitelib}/construct
|
|
|
|
%{python_sitelib}/construct-%{version}-py%{python_version}.egg-info
|
2019-12-15 13:20:28 +00:00
|
|
|
%endif
|
2013-04-30 11:22:38 +00:00
|
|
|
|
2014-05-08 13:16:42 +00:00
|
|
|
%changelog
|