python-terminado/python-terminado.spec
2023-09-13 17:28:40 +08:00

71 lines
1.8 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
%global pypi_name terminado
Name: python-%{pypi_name}
Version: 0.17.1
Release: 1
Summary: Tornado websocket backend for the Xterm.js Javascript terminal emulator library.
License: BSD-2-Clause
URL: https://github.com/jupyter/terminado
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-hatchling
%global _description %{expand:
This is a Tornado websocket backend for the Xterm.js Javascript terminal emulator library.}
%description %_description
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name} %_description
%package help
Summary: Development documents and examples for %{pypi_name}.
Provides: python3-%{pypi_name}-doc
%description help
Development documents and examples for %{pypi_name}.
%prep
%autosetup -n %{pypi_name}-%{version}
%build
%pyproject_build
%install
%pyproject_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/doclist.lst .
%files -n python3-%{pypi_name}
%doc CHANGELOG.md CONTRIBUTING.rst README.md RELEASE.md
%license LICENSE
%{python3_sitelib}/terminado
%{python3_sitelib}/terminado*.dist-info/
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Wed Sep 13 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.17.1-1
- Initial package.