SampleSpecs/python3module: различия между версиями

Материал из ALT Linux Wiki
Нет описания правки
(Новая схема с %pyproject*)
Строка 19: Строка 19:


BuildRequires(pre): rpm-build-python3
BuildRequires(pre): rpm-build-python3
BuildRequires: python3(setuptools)
BuildRequires: python3(wheel)
#BuildRequires(pre): rpm-macros-sphinx3
#BuildRequires(pre): rpm-macros-sphinx3


Строка 30: Строка 32:


%build
%build
%python3_build
%pyproject_build


%install
%install
%python3_install
%pyproject_install


%files
%files
%python3_sitelibdir/%modulename/
%python3_sitelibdir/%modulename/
%python3_sitelibdir/*.egg-info</pre>
%python3_sitelibdir/%modulename-%version.dist-info/


</pre>
</pre>


{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}
{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}

Версия от 16:55, 31 июля 2023

примечание: адаптировано mike@, который не питонист ни разу; проверьте/поправьте при надобности

примечание: устарело согласно Python packaging guide

%define modulename foo

Name: python3-module-%modulename
Version: 1.0
Release: alt1

Summary: ...
License: GPLv3+
Group: Development/Python3

Url: http://...
BuildArch: noarch
Source: %name-%version.tar

BuildRequires(pre): rpm-build-python3
BuildRequires: python3(setuptools)
BuildRequires: python3(wheel)
#BuildRequires(pre): rpm-macros-sphinx3

# %%add_python3_req_skip ...

%description
...

%prep
%setup

%build
%pyproject_build

%install
%pyproject_install

%files
%python3_sitelibdir/%modulename/
%python3_sitelibdir/%modulename-%version.dist-info/