Init package version 0.1.13 of htmlmin2

This commit is contained in:
luolu12 2023-08-25 11:13:44 +08:00
parent 7254be53b5
commit 4c5d161b1c
2 changed files with 78 additions and 0 deletions

BIN
htmlmin-0.1.13.tar.gz Normal file

Binary file not shown.

78
python-htmlmin2.spec Normal file
View File

@ -0,0 +1,78 @@
%global pypi_name htmlmin2
%global source_name htmlmin
Name: python-%{pypi_name}
Version: 0.1.13
Release: 1
Summary: An HTML Minifier
License: BSD
URL: https://github.com/wilhelmer/htmlmin
Source0: https://codeload.github.com/wilhelmer/htmlmin/tar.gz/refs/tags/v0.1.13/htmlmin-0.1.13.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-hatchling
%description
A configurable HTML Minifier with safety features.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%package help
Summary: %{summary}
Provides: python3-%{pypi_name}-doc
%description help
Documentation for htmlmin
%description -n python3-%{pypi_name}
A configurable HTML Minifier with safety features.
%package -n python-%{pypi_name}-doc
Summary: htmlmin documentation
%description -n python-%{pypi_name}-doc
Documentation for htmlmin
%prep
%autosetup -n %{source_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 .
%check
%{__python3} setup.py test
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{_bindir}/htmlmin
%{python3_sitelib}/%{source_name}*
%files help
%{_docdir}/*
%changelog
* Fri Aug 25 2023 luolu12 <luluoc@isoftstone.com> - 0.1.13-1
- Initial package.