Macro cleanup
- Drop srcname and pkgname macros, just use the values in the appropriate places - Remove test conditional (always run tests)
This commit is contained in:
parent
8f9b392ad2
commit
b6a736f0f8
@ -1,43 +1,33 @@
|
|||||||
# what it's called on pypi
|
|
||||||
%global srcname prompt_toolkit
|
|
||||||
# package name fragment
|
|
||||||
%global pkgname prompt-toolkit
|
|
||||||
|
|
||||||
%global common_description %{expand:
|
%global common_description %{expand:
|
||||||
prompt_toolkit is a library for building powerful interactive command line
|
prompt_toolkit is a library for building powerful interactive command line
|
||||||
applications in Python.}
|
applications in Python.}
|
||||||
|
|
||||||
%bcond_without tests
|
Name: python-prompt-toolkit
|
||||||
|
|
||||||
|
|
||||||
Name: python-%{pkgname}
|
|
||||||
Version: 3.0.36
|
Version: 3.0.36
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Library for building powerful interactive command line applications in Python
|
Summary: Library for building powerful interactive command line applications in Python
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/prompt-toolkit/python-prompt-toolkit
|
URL: https://github.com/prompt-toolkit/python-prompt-toolkit
|
||||||
Source0: %pypi_source
|
Source: %{pypi_source prompt_toolkit}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
%description %{common_description}
|
%description %{common_description}
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-%{pkgname}
|
%package -n python3-prompt-toolkit
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%if %{with tests}
|
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
%endif
|
|
||||||
# https://github.com/jonathanslenders/python-prompt-toolkit/issues/94
|
# https://github.com/jonathanslenders/python-prompt-toolkit/issues/94
|
||||||
Recommends: python3-pygments
|
Recommends: python3-pygments
|
||||||
|
|
||||||
|
|
||||||
%description -n python3-%{pkgname} %{common_description}
|
%description -n python3-prompt-toolkit %{common_description}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version}
|
%autosetup -n prompt_toolkit-%{version}
|
||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
@ -50,16 +40,14 @@ Recommends: python3-pygments
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%pyproject_save_files %{srcname}
|
%pyproject_save_files prompt_toolkit
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
|
||||||
%check
|
%check
|
||||||
%pytest
|
%pytest
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-%{pkgname} -f %{pyproject_files}
|
%files -n python3-prompt-toolkit -f %{pyproject_files}
|
||||||
%doc README.rst AUTHORS.rst CHANGELOG
|
%doc README.rst AUTHORS.rst CHANGELOG
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user