python-pdm-pep517/python-pdm-pep517.spec
2023-09-22 09:23:40 +08:00

78 lines
2.2 KiB
RPMSpec

Name: python-pdm-pep517
Version: 1.1.4
Release: 1
Summary: Yet another PEP 517 backend
License: MIT AND Apache-2.0 AND Public Domain AND BSD-3-Clause AND ISC
URL: https://github.com/pdm-project/pdm-backend
Source0: %{url}/archive/v%{version}/pdm-pep517-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-wheel
BuildRequires: python3-pip
BuildRequires: gcc
BuildRequires: git
BuildRequires: python3-pytest
%description
This is the backend for PDM projects, while you can also use it alone. It
reads the metadata of PEP 621 format and coverts it to Core metadata.
%package -n python3-pdm-pep517
Summary: %{summary}
%description -n python3-pdm-pep517
This is the backend for PDM projects, while you can also use it alone. It
reads the metadata of PEP 621 format and coverts it to Core metadata.
%prep
%autosetup -p1 -n pdm-pep517-%{version}
%build
%pyproject_build
%install
%pyproject_install pdm-pep517==%{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
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
popd
mv %{buildroot}/filelist.lst .
%check
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
/usr/bin/pytest
%files -n python3-pdm-pep517
%license LICENSE
%doc README.md
%{python3_sitelib}/pdm/pep517/
%{python3_sitelib}/pdm_pep517-*.dist-info/
%changelog
* Tue Sep 19 2023 mengzhaoa <mengzhaoa@isoftstone.com> - 1.1.4-1
- Upgrade package to version 1.1.4.
* Mon Apr 24 2023 liyanan <thistleslyn@163.com> - 1.0.5-1
- Package init