101 lines
2.9 KiB
RPMSpec
101 lines
2.9 KiB
RPMSpec
%global _empty_manifest_terminate_build 0
|
|
%global _description \
|
|
Testpath is a collection of utilities for Python code working with files and \
|
|
commands. \
|
|
\
|
|
It contains functions to check things on the filesystem, and tools for \
|
|
mocking system commands and recording calls to those.
|
|
|
|
Name: python-testpath
|
|
Version: 0.6.0
|
|
Release: 2
|
|
Summary: Test utilities for code working with files and commands
|
|
License: MIT
|
|
URL: https://github.com/jupyter/testpath
|
|
Source0: https://files.pythonhosted.org/packages/08/ad/a3e7d580902f57e31d2181563fc4088894692bb6ef79b816344f27719cdc/testpath-0.6.0.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: python3-hatchling python3-hatch-vcs
|
|
|
|
%description
|
|
%_description
|
|
|
|
%package -n python3-testpath
|
|
Summary: Test utilities for code working with files and commands
|
|
Provides: python-testpath = %{version}-%{release}
|
|
BuildRequires: python3-pip
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-flit-core
|
|
BuildRequires: python3-sphinx
|
|
BuildRequires: python3-sphinx_rtd_theme
|
|
BuildRequires: python3-pytest
|
|
%description -n python3-testpath
|
|
%_description
|
|
|
|
%package help
|
|
Summary: Development documents and examples for testpath
|
|
Provides: python3-testpath-doc
|
|
%description help
|
|
%_description
|
|
|
|
%prep
|
|
%autosetup -n testpath-%{version}
|
|
|
|
# The exe files are only needed on Microsoft Windows
|
|
rm -f testpath/*.exe
|
|
|
|
%build
|
|
%pyproject_build
|
|
|
|
%install
|
|
%pyproject_install testpath==%{version}
|
|
|
|
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
|
|
if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi
|
|
if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi
|
|
if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi
|
|
pushd %{buildroot}
|
|
if [ -d usr/lib ]; then
|
|
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/lib64 ]; then
|
|
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/bin ]; then
|
|
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/sbin ]; then
|
|
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
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}/filelist.lst .
|
|
mv %{buildroot}/doclist.lst .
|
|
|
|
%check
|
|
%{__python3} -m pytest -v
|
|
|
|
%files -n python3-testpath -f filelist.lst
|
|
%dir %{python3_sitelib}/*
|
|
%{python3_sitelib}/testpath/__pycache__/
|
|
%license LICENSE
|
|
|
|
%files help -f doclist.lst
|
|
%{_docdir}/*
|
|
|
|
%changelog
|
|
* Wed Apr 26 2023 liyanan <thistleslyn@163.com> - 0.6.0-2
|
|
- Adapting to the pyproject.toml compilation mode
|
|
|
|
* Tue Mar 07 2023 wangjunqi <wangjunqi@kylinos.cn> - 0.6.0-1
|
|
- Update package to version 0.6.0
|
|
|
|
* Wed Jun 23 2021 wangxiaomeng <wangxiaomeng@kylinos.cn> - 0.3.1-1
|
|
- Package init
|