2015-04-23 09:34:56 +00:00
|
|
|
|
#
|
2025-06-12 12:04:29 +00:00
|
|
|
|
# spec file for package python-simpleeval
|
2015-04-23 09:34:56 +00:00
|
|
|
|
#
|
2025-06-12 12:04:29 +00:00
|
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2024-01-17 07:19:24 +00:00
|
|
|
|
# Copyright (c) 2015-2024 Dr. Axel Braun
|
2015-04-23 09:34:56 +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.
|
|
|
|
|
|
2019-04-25 07:36:48 +00:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-04-23 09:34:56 +00:00
|
|
|
|
#
|
|
|
|
|
|
2025-06-12 12:04:29 +00:00
|
|
|
|
|
2015-04-23 09:34:56 +00:00
|
|
|
|
%define modname simpleeval
|
2025-06-12 12:04:29 +00:00
|
|
|
|
%{?sle15_python_module_pythons}
|
2015-04-23 09:34:56 +00:00
|
|
|
|
Name: python-%{modname}
|
2023-12-29 09:16:30 +00:00
|
|
|
|
Version: 0.9.13
|
2015-04-23 09:34:56 +00:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: A simple, safe single expression evaluator library
|
|
|
|
|
License: MIT
|
2019-04-25 07:36:48 +00:00
|
|
|
|
URL: https://github.com/danthedeckie/simpleeval
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/s/simpleeval/%{modname}-%{version}.tar.gz
|
2025-06-12 12:04:29 +00:00
|
|
|
|
BuildRequires: %{python_module pip}
|
2017-05-15 13:04:00 +00:00
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-06-12 12:04:29 +00:00
|
|
|
|
BuildRequires: %{python_module wheel}
|
2020-03-10 10:41:46 +00:00
|
|
|
|
BuildRequires: fdupes
|
2019-04-25 07:36:48 +00:00
|
|
|
|
BuildRequires: python-rpm-macros
|
2015-04-23 09:34:56 +00:00
|
|
|
|
BuildArch: noarch
|
2019-04-25 07:36:48 +00:00
|
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
# /SECTION
|
2017-05-15 13:04:00 +00:00
|
|
|
|
%python_subpackages
|
2015-04-23 09:34:56 +00:00
|
|
|
|
|
|
|
|
|
%description
|
2015-04-23 09:37:26 +00:00
|
|
|
|
A quick single file library for easily adding evaluatable expressions
|
|
|
|
|
into python projects. Say you want to allow a user to set an alarm volume,
|
|
|
|
|
which could depend on the time of day, alarm level, how many previous alarms
|
|
|
|
|
had gone off, and if there is music playing at the time.
|
2015-04-23 09:34:56 +00:00
|
|
|
|
|
2019-04-25 07:36:48 +00:00
|
|
|
|
Or if you want to allow simple formulare in a web application, but don’t want
|
2015-04-23 09:37:26 +00:00
|
|
|
|
to give full eval() access, or don’t want to run in javascript on the client side.
|
2015-04-23 09:34:56 +00:00
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{modname}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
2025-06-12 12:04:29 +00:00
|
|
|
|
%pyproject_wheel
|
2015-04-23 09:34:56 +00:00
|
|
|
|
|
|
|
|
|
%install
|
2025-06-12 12:04:29 +00:00
|
|
|
|
%pyproject_install
|
2020-03-10 10:41:46 +00:00
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2015-04-23 09:34:56 +00:00
|
|
|
|
|
2019-04-25 07:36:48 +00:00
|
|
|
|
%check
|
|
|
|
|
%pytest
|
|
|
|
|
|
2017-05-15 13:04:00 +00:00
|
|
|
|
%files %{python_files}
|
2015-04-23 09:37:26 +00:00
|
|
|
|
%doc README.rst
|
2019-04-25 07:36:48 +00:00
|
|
|
|
%license LICENCE
|
2025-06-12 12:04:29 +00:00
|
|
|
|
%{python_sitelib}/simpleeval.py
|
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/simpleeval*
|
|
|
|
|
%{python_sitelib}/simpleeval-%{version}*-info
|
2015-04-23 09:34:56 +00:00
|
|
|
|
|
|
|
|
|
%changelog
|