!3 Upgrade to latest release [python-testpath -> 0.6.0]
From: @Wangjunqi123 Reviewed-by: @yangzhao_kl Signed-off-by: @yangzhao_kl
This commit is contained in:
commit
7971d8de16
11
0001-add-setup.patch
Normal file
11
0001-add-setup.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- c/setup.py 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ a/setup.py 2023-03-07 09:36:37.599063820 +0800
|
||||
@@ -0,0 +1,8 @@
|
||||
+from setuptools import setup
|
||||
+
|
||||
+
|
||||
+setup(
|
||||
+ name = "testpath",
|
||||
+ version = "0.6.0",
|
||||
+ 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.",
|
||||
+ )
|
||||
@ -1,30 +1,4 @@
|
||||
%{?python_enable_dependency_generator}
|
||||
%global pypi_name testpath
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 0.3.1
|
||||
Release: 1
|
||||
Summary: Test utilities for code working with files and commands
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/jupyter/testpath
|
||||
|
||||
# There is no sdist on PyPI, download from GitHub
|
||||
Source0: %url/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-devel
|
||||
|
||||
BuildRequires: python3-flit
|
||||
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-sphinx_rtd_theme
|
||||
|
||||
# Tests:
|
||||
BuildRequires: python3-pytest
|
||||
|
||||
%global _empty_manifest_terminate_build 0
|
||||
%global _description \
|
||||
Testpath is a collection of utilities for Python code working with files and \
|
||||
commands. \
|
||||
@ -32,60 +6,90 @@ commands. \
|
||||
It contains functions to check things on the filesystem, and tools for \
|
||||
mocking system commands and recording calls to those.
|
||||
|
||||
%description %_description
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: %summary
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
Name: python-testpath
|
||||
Version: 0.6.0
|
||||
Release: 1
|
||||
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
|
||||
Patch0: 0001-add-setup.patch
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
%_description
|
||||
|
||||
%package doc
|
||||
Summary: %{name} documentation
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
%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
|
||||
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 %{pypi_name}-%{version}
|
||||
%autosetup -n testpath-%{version}
|
||||
|
||||
# The exe files are only needed on Microsoft Windows
|
||||
rm -f %{pypi_name}/*.exe
|
||||
rm -f testpath/*.exe
|
||||
|
||||
%build
|
||||
# this package has no setup.py
|
||||
# and upstream does not want one
|
||||
# https://github.com/takluyver/flit/issues/74
|
||||
# we use flit to create a wheel from sources
|
||||
flit build --format wheel
|
||||
|
||||
# generate html docs
|
||||
sphinx-build-3 doc html
|
||||
# remove the sphinx-build leftovers
|
||||
rm -rf html/.{doctrees,buildinfo}
|
||||
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
# We install the wheel created at %%build
|
||||
%py3_install_wheel %{pypi_name}-%{version}-py2.py3-none-any.whl
|
||||
|
||||
|
||||
%py3_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
|
||||
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-%{pypi_name}
|
||||
%doc README.rst
|
||||
%files -n python3-testpath -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/
|
||||
%{python3_sitelib}/%{pypi_name}/
|
||||
|
||||
%files doc
|
||||
%doc html
|
||||
%files help -f doclist.lst
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
Binary file not shown.
BIN
testpath-0.6.0.tar.gz
Normal file
BIN
testpath-0.6.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user