update version to 0.6.0

This commit is contained in:
Wangjunqi123 2023-03-07 09:24:01 +08:00
parent 675a6462d8
commit e402c7750e
4 changed files with 77 additions and 62 deletions

11
0001-add-setup.patch Normal file
View 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.",
+ )

View File

@ -1,30 +1,4 @@
%{?python_enable_dependency_generator} %global _empty_manifest_terminate_build 0
%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 _description \ %global _description \
Testpath is a collection of utilities for Python code working with files and \ Testpath is a collection of utilities for Python code working with files and \
commands. \ commands. \
@ -32,60 +6,90 @@ commands. \
It contains functions to check things on the filesystem, and tools for \ It contains functions to check things on the filesystem, and tools for \
mocking system commands and recording calls to those. mocking system commands and recording calls to those.
%description %_description Name: python-testpath
Version: 0.6.0
%package -n python3-%{pypi_name} Release: 1
Summary: %summary Summary: Test utilities for code working with files and commands
%{?python_provide:%python_provide python3-%{pypi_name}} License: MIT
URL: https://github.com/jupyter/testpath
%description -n python3-%{pypi_name} Source0: https://files.pythonhosted.org/packages/08/ad/a3e7d580902f57e31d2181563fc4088894692bb6ef79b816344f27719cdc/testpath-0.6.0.tar.gz
Patch0: 0001-add-setup.patch
BuildArch: noarch
%description
%_description %_description
%package doc %package -n python3-testpath
Summary: %{name} documentation Summary: Test utilities for code working with files and commands
%description doc Provides: python-testpath = %{version}-%{release}
Documentation for %{name}. 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 %prep
%autosetup -n %{pypi_name}-%{version} %autosetup -n testpath-%{version}
# The exe files are only needed on Microsoft Windows # The exe files are only needed on Microsoft Windows
rm -f %{pypi_name}/*.exe rm -f testpath/*.exe
%build %build
# this package has no setup.py %py3_build
# 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}
%install %install
# We install the wheel created at %%build %py3_install
%py3_install_wheel %{pypi_name}-%{version}-py2.py3-none-any.whl 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 %check
%{__python3} -m pytest -v %{__python3} -m pytest -v
%files -n python3-testpath -f filelist.lst
%files -n python3-%{pypi_name} %dir %{python3_sitelib}/*
%doc README.rst
%license LICENSE %license LICENSE
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/
%{python3_sitelib}/%{pypi_name}/
%files doc %files help -f doclist.lst
%doc html %{_docdir}/*
%changelog %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 * Wed Jun 23 2021 wangxiaomeng <wangxiaomeng@kylinos.cn> - 0.3.1-1
- Package init - Package init

Binary file not shown.

BIN
testpath-0.6.0.tar.gz Normal file

Binary file not shown.