2800b49530
This macro save generates file section to %pyproject_files. It should simplify %files section and allow to build by some automatic machinery Supposed use case in Fedora: %install %pyproject_install %pyproject_save_files requests _requests %files -n python3-requests -f %{pyproject_files} %doc README.rst %license LICENSE Automatic build of arbitrary packages (e.g. in Copr): %install %pyproject_install %pyproject_save_files * +bindir // save all modules with executables %files -n python3-requests -f %{pyproject_files} Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
53 lines
1.1 KiB
RPMSpec
53 lines
1.1 KiB
RPMSpec
%global pypi_name openqa_client
|
|
Name: python-%{pypi_name}
|
|
Version: 4.0.0
|
|
Release: 1%{?dist}
|
|
Summary: Python client library for openQA API
|
|
|
|
License: GPLv2+
|
|
URL: https://github.com/os-autoinst/openQA-python-client
|
|
Source0: %{pypi_source}
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
%description
|
|
This package uses tox.ini file with recursive deps (via the -r option).
|
|
|
|
|
|
%package -n python3-%{pypi_name}
|
|
Summary: %{summary}
|
|
|
|
%description -n python3-%{pypi_name}
|
|
%{summary}.
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
|
# setuptools-git is needed to build the source distribution, but not
|
|
# for packaging, which *starts* from the source distribution
|
|
# we sed it out to save ourselves a dependency, but that is not strictly required
|
|
sed -i -e 's., "setuptools-git"..g' pyproject.toml
|
|
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires -t
|
|
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files %{pypi_name}
|
|
|
|
|
|
%check
|
|
%tox
|
|
|
|
|
|
%files -n python3-%{pypi_name} -f %{pyproject_files}
|
|
%doc README.*
|
|
%license COPYING
|