- Convert to pip-based build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-haproxyctl?expand=0&rev=7
This commit is contained in:
79
python-haproxyctl.spec
Normal file
79
python-haproxyctl.spec
Normal file
@@ -0,0 +1,79 @@
|
||||
#
|
||||
# spec file for package python-haproxyctl
|
||||
#
|
||||
# Copyright (c) 2025 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/
|
||||
#
|
||||
|
||||
|
||||
Name: python-haproxyctl
|
||||
Version: 0.5
|
||||
Release: 0
|
||||
Summary: HAProxy control tool
|
||||
License: GPL-3.0-only
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/neurogeek/haproxyctl
|
||||
Source: https://github.com/neurogeek/haproxyctl/archive/v%{version}.tar.gz#/haproxyctl-%{version}.tar.gz
|
||||
Source1: gpl-3.0.txt
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: unzip
|
||||
Requires: haproxy
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This is a utility to control HAProxy features through its admin
|
||||
socket. haproxyctl has the ability to disable/enable servers, fetch
|
||||
info from the running instance and list available servers, together
|
||||
with their status.
|
||||
|
||||
%prep
|
||||
%setup -q -n haproxyctl-%{version}
|
||||
# The package is under GPL-3.0, as expressed in setup.py, but the
|
||||
# license file is not included in the source code.
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/haproxyctl
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%{python_expand mkdir -p %{buildroot}%{_datadir}/$python-haproxyctl/
|
||||
cp -a conf %{buildroot}%{_datadir}/$python-haproxyctl/}
|
||||
|
||||
%check
|
||||
%{python_expand $python -m unittest discover -s haproxy/tests}
|
||||
|
||||
%post
|
||||
%python_install_alternative haproxyctl
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative haproxyctl
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license gpl-3.0.txt
|
||||
%dir %{_datadir}/%{python_flavor}-haproxyctl
|
||||
%{python_sitelib}/haproxyctl
|
||||
%{python_sitelib}/haproxyctl-%{version}*-info
|
||||
%python_alternative %{_bindir}/haproxyctl
|
||||
%{_datadir}/%{python_flavor}-haproxyctl/*
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user