2011-09-23 13:56:56 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-bottle
|
|
|
|
#
|
2025-04-22 07:39:45 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2011-09-23 13:56: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.
|
2012-11-22 14:10:28 +00:00
|
|
|
|
2019-02-28 15:22:39 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-23 13:56:56 +00:00
|
|
|
#
|
|
|
|
|
2012-11-22 14:10:28 +00:00
|
|
|
|
2025-08-11 14:02:07 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2025-06-17 08:43:55 +00:00
|
|
|
%bcond_without libalternatives
|
2025-08-11 14:02:07 +00:00
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
2023-04-21 14:51:36 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2011-09-23 13:56:56 +00:00
|
|
|
Name: python-bottle
|
2025-06-17 06:48:37 +00:00
|
|
|
Version: 0.13.4
|
2011-09-23 13:56:56 +00:00
|
|
|
Release: 0
|
2019-03-17 15:27:14 +00:00
|
|
|
Summary: WSGI framework for small web applications
|
2011-09-23 13:56:56 +00:00
|
|
|
License: MIT
|
2019-07-29 08:41:44 +00:00
|
|
|
URL: https://bottlepy.org/
|
2017-03-23 18:15:03 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/b/bottle/bottle-%{version}.tar.gz
|
2015-04-27 07:25:30 +00:00
|
|
|
Source1: http://bottlepy.org/docs/0.12/bottle-docs.pdf
|
2023-10-18 05:47:01 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2017-03-23 18:15:03 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-10-18 05:47:01 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2023-03-06 06:55:48 +00:00
|
|
|
BuildRequires: fdupes
|
2017-03-23 18:15:03 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2025-08-11 14:02:07 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
BuildRequires: alts
|
2025-06-17 08:43:55 +00:00
|
|
|
Requires: alts
|
2025-08-11 14:02:07 +00:00
|
|
|
%else
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
%endif
|
2011-09-23 13:56:56 +00:00
|
|
|
BuildArch: noarch
|
2017-03-23 18:15:03 +00:00
|
|
|
%python_subpackages
|
2010-11-19 14:52:51 +00:00
|
|
|
|
2011-09-23 13:56:56 +00:00
|
|
|
%description
|
2019-03-17 15:27:14 +00:00
|
|
|
Bottle is a micro-framework for small web applications. It offers
|
|
|
|
request dispatching (routes) with URL parameter support, templates, a
|
|
|
|
built-in HTTP server, and adapters for many third party WSGI/HTTP
|
|
|
|
servers and template engines. This is all in a single file and with
|
|
|
|
no dependencies other than the Python Standard Library.
|
2010-11-19 14:52:51 +00:00
|
|
|
|
2023-05-03 14:41:27 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-03-23 18:15:03 +00:00
|
|
|
%package -n %{name}-doc
|
2015-04-27 07:25:30 +00:00
|
|
|
Summary: Documentation for %{name}
|
2017-03-23 18:15:03 +00:00
|
|
|
Provides: %{python_module bottle-doc = %{version}}
|
2015-04-27 07:25:30 +00:00
|
|
|
|
2017-03-23 18:15:03 +00:00
|
|
|
%description -n %{name}-doc
|
2019-03-17 15:27:14 +00:00
|
|
|
Bottle is a micro-framework for small web applications. It offers
|
|
|
|
request dispatching (routes) with URL parameter support, templates, a
|
|
|
|
built-in HTTP server, and adapters for many third party WSGI/HTTP
|
|
|
|
servers and template engines. This is all in a single file and with
|
|
|
|
no dependencies other than the Python Standard Library.
|
2015-04-27 07:25:30 +00:00
|
|
|
|
|
|
|
This subpackage contains the PDF documentation for %{name}.
|
2023-05-03 14:41:27 +00:00
|
|
|
%endif
|
2015-04-27 07:25:30 +00:00
|
|
|
|
2010-11-19 14:52:51 +00:00
|
|
|
%prep
|
2023-10-18 05:47:01 +00:00
|
|
|
%autosetup -p1 -n bottle-%{version}
|
2020-11-14 11:24:31 +00:00
|
|
|
cp %{SOURCE1} .
|
2025-07-15 07:16:09 +00:00
|
|
|
chmod 644 bottle.py
|
|
|
|
sed -i '1{ /^#!/d }' bottle.py
|
2011-09-23 13:56:56 +00:00
|
|
|
|
2010-11-19 14:52:51 +00:00
|
|
|
%build
|
2023-10-18 05:47:01 +00:00
|
|
|
%pyproject_wheel
|
2010-11-19 14:52:51 +00:00
|
|
|
|
2011-09-23 13:56:56 +00:00
|
|
|
%install
|
2023-10-18 05:47:01 +00:00
|
|
|
%pyproject_install
|
2025-07-15 07:16:09 +00:00
|
|
|
rm -rf %{buildroot}%{_bindir}/bottle.py
|
2023-03-06 06:55:48 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2024-10-14 08:26:58 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/bottle
|
2020-04-14 11:58:50 +00:00
|
|
|
|
2020-11-14 11:24:31 +00:00
|
|
|
%check
|
2022-08-04 04:23:28 +00:00
|
|
|
%pyunittest -v
|
2020-11-14 11:24:31 +00:00
|
|
|
|
2025-06-17 08:43:55 +00:00
|
|
|
%pre
|
2025-06-17 08:46:47 +00:00
|
|
|
%python_libalternatives_reset_alternative bottle.py
|
2025-07-15 07:16:09 +00:00
|
|
|
%python_libalternatives_reset_alternative bottle
|
2015-04-27 07:25:30 +00:00
|
|
|
|
2025-08-11 14:02:07 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative bottle
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative bottle.py
|
|
|
|
%python_uninstall_alternative bottle
|
|
|
|
|
2017-03-23 18:15:03 +00:00
|
|
|
%files %{python_files}
|
2019-02-28 15:23:25 +00:00
|
|
|
%license LICENSE
|
2017-03-23 18:15:03 +00:00
|
|
|
%doc README.rst
|
2024-10-14 08:26:58 +00:00
|
|
|
%python_alternative %{_bindir}/bottle
|
2012-08-16 08:04:25 +00:00
|
|
|
%{python_sitelib}/bottle.py*
|
2017-03-23 18:15:03 +00:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__
|
2023-10-18 05:47:01 +00:00
|
|
|
%{python_sitelib}/bottle-%{version}.dist-info
|
2010-11-19 14:52:51 +00:00
|
|
|
|
2023-05-03 14:41:27 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-03-23 18:15:03 +00:00
|
|
|
%files -n %{name}-doc
|
2023-05-03 14:41:27 +00:00
|
|
|
%endif
|
2017-03-23 18:15:03 +00:00
|
|
|
%doc bottle-docs.pdf
|
2015-04-27 07:25:30 +00:00
|
|
|
|
2010-11-19 14:52:51 +00:00
|
|
|
%changelog
|