diff --git a/0001-bugfix.patch b/0001-bugfix.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a6c3ea1b8c7b019dcc21b5c95955b925bf579c7 --- /dev/null +++ b/0001-bugfix.patch @@ -0,0 +1,28 @@ +From 07a421022352aedd07dae42171923b28ccf3cffa Mon Sep 17 00:00:00 2001 +From: luolu12 +Date: Wed, 30 Aug 2023 11:04:28 +0800 +Subject: [PATCH] bugfix + +--- + pyproject.toml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index b8e918e..bcfa59e 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -36,9 +36,9 @@ classifiers = [ + "Typing :: Typed", + ] + dependencies = [ +- "ansimarkup~=1.4", ++ "ansimarkup>1.4", + "jinja2>=2.11, <4", +- "ptyprocess~=0.6; sys_platform != 'win32'", ++ "ptyprocess>0.6; sys_platform != 'win32'", + "typing-extensions>=4.1; python_version < '3.10'", + ] + version = "1.0.1" +-- +2.33.0 + diff --git a/failprint-1.0.1.tar.gz b/failprint-1.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e6abbd6cb586514a5be0b95453947b3ae605e85d Binary files /dev/null and b/failprint-1.0.1.tar.gz differ diff --git a/python-failprint.spec b/python-failprint.spec new file mode 100644 index 0000000000000000000000000000000000000000..fc61ff8767f461f24a228cd13dacadb51e9d8f21 --- /dev/null +++ b/python-failprint.spec @@ -0,0 +1,71 @@ +%global pypi_name failprint + +Name: python-%{pypi_name} +Version: 1.0.1 +Release: 1 +Summary: Run a command, print its output only if it fails. + +License: ISC +URL: https://pawamoy.github.io/failprint/ +Source0: https://files.pythonhosted.org/packages/2b/f4/b51b8aa9096ffaca509e1b52c5df1ae92077d157a8ecbecba85e8fd826ec/failprint-1.0.1.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-hatchling +BuildRequires: python3-pdm-pep517 +BuildRequires: python3-pdm-backend + +Patch001:0001-bugfix.patch + +%description +Run a command, print its output only if it fails. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} +%description -n python3-%{pypi_name} +Run a command, print its output only if it fails. + +%package help +Summary: %{summary} +Provides: python3-%{pypi_name}-doc +%description help +Run a command, print its output only if it fails. + + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +%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} +%license LICENSE +%doc README.md +%{python3_sitelib}/failprint* +%{_bindir}/failprint + +%files help +%{_docdir}/* + +%changelog +* Tue Aug 29 2023 luolu12 - 1.0.1-1 +- Initial package.