python-platformdirs/python-platformdirs.spec

95 lines
3.2 KiB
RPMSpec
Raw Normal View History

2022-06-02 02:50:21 +00:00
%global _empty_manifest_terminate_build 0
Name: python-platformdirs
Version: 2.5.1
2022-04-27 11:04:27 +08:00
Release: 1
2022-06-02 02:50:21 +00:00
Summary: A small Python module for determining appropriate platform-specific dirs
2022-04-27 11:04:27 +08:00
License: MIT
URL: https://github.com/platformdirs/platformdirs
2022-06-02 02:50:21 +00:00
Source0: https://files.pythonhosted.org/packages/33/66/61da40aa546141b0d70b37fe6bb4ef1200b4b4cb98849f131b58faa9a5d2/platformdirs-2.5.1.tar.gz
Patch0: 0001-fix-pkg-version.patch
2022-04-27 11:04:27 +08:00
BuildArch: noarch
2022-06-02 02:50:21 +00:00
%description
The problem When writing desktop application, finding the right location to
store user data and configuration varies per platform. Even for single-platform
apps, there may by plenty of nuances in figuring out the right location.
2022-04-27 11:04:27 +08:00
2022-06-02 02:50:21 +00:00
%package -n python3-platformdirs
Summary: A small Python module for determining appropriate platform-specific dirs
Provides: python-platformdirs
# Base build requires
2022-04-27 11:04:27 +08:00
BuildRequires: python3-devel
2022-06-02 02:50:21 +00:00
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
# Tests running requires
BuildRequires: python3-appdirs
BuildRequires: python3-pytest
BuildRequires: python3-pytest-mock
BuildRequires: python3-coverage
%description -n python3-platformdirs
The problem When writing desktop application, finding the right location to
store user data and configuration varies per platform. Even for single-platform
apps, there may by plenty of nuances in figuring out the right location.
2022-04-27 11:04:27 +08:00
2022-06-02 02:50:21 +00:00
%package help
Summary: A small Python module for determining appropriate platform-specific dirs
Provides: python3-platformdirs-doc
%description help
The problem When writing desktop application, finding the right location to
store user data and configuration varies per platform. Even for single-platform
apps, there may by plenty of nuances in figuring out the right location
2022-04-27 11:04:27 +08:00
%prep
2022-06-02 02:50:21 +00:00
%autosetup -n platformdirs-%{version} -p1
2022-04-27 11:04:27 +08:00
cp -r src/platformdirs tests/
cp -r src/platformdirs ./
%build
%py3_build
%install
%py3_install
2022-06-02 02:50:21 +00:00
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}
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 .
2022-04-27 11:04:27 +08:00
%check
/usr/bin/pytest
2022-06-02 02:50:21 +00:00
%files -n python3-platformdirs -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
2022-04-27 11:04:27 +08:00
%changelog
2022-06-02 02:50:21 +00:00
* Thu May 26 2022 OpenStack_SIG <openstack@openeuler.org> - 2.5.1-1
- Upgrade the version to 2.5.1
2022-04-27 11:04:27 +08:00
* Wed Apr 27 2022 caodongxia <caodongxia@h-partners.com> - 2.3.0-1
2022-06-02 02:50:21 +00:00
- init package