package init
This commit is contained in:
parent
05e33cb0d7
commit
974a286570
72
python-tomli-w.spec
Normal file
72
python-tomli-w.spec
Normal file
@ -0,0 +1,72 @@
|
||||
Name: python-tomli-w
|
||||
Version: 1.0.0
|
||||
Release: 1
|
||||
Summary: A Python library for writing TOML
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/hukkin/tomli-w
|
||||
Source0: https://github.com/hukkin/tomli-w/archive/%{version}/tomli-w-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel python3-pip python3-flit-core python3-pytest
|
||||
|
||||
%description
|
||||
Tomli-W is a Python library for writing TOML. It is a write-only counterpart
|
||||
to Tomli, which is a read-only TOML parser. Tomli-W is fully compatible
|
||||
with TOML v1.0.0.
|
||||
|
||||
%package -n python3-tomli-w
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n python3-tomli-w
|
||||
Tomli-W is a Python library for writing TOML. It is a write-only counterpart
|
||||
to Tomli, which is a read-only TOML parser. Tomli-W is fully compatible
|
||||
with TOML v1.0.0.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n tomli-w-%{version}
|
||||
# Measuring coverage is discouraged in Python packaging guidelines:
|
||||
sed -i '/pytest-cov/d' tests/requirements.txt
|
||||
|
||||
%build
|
||||
%pyproject_build
|
||||
|
||||
%install
|
||||
%pyproject_install tomli-w==%{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.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
|
||||
popd
|
||||
mv %{buildroot}/filelist.lst .
|
||||
|
||||
%check
|
||||
%{__python3} -m pytest -v
|
||||
|
||||
%files -n python3-tomli-w -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
%{python3_sitelib}/tomli_w/__pycache__/
|
||||
%license LICENSE
|
||||
%doc README.md CHANGELOG.md
|
||||
|
||||
%changelog
|
||||
* Tue Apr 25 2023 liyanan <thistleslyn@163.com> - 1.0.0-1
|
||||
- Package init
|
||||
|
||||
BIN
tomli-w-1.0.0.tar.gz
Normal file
BIN
tomli-w-1.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user