Use pyproject to compile package
This commit is contained in:
parent
2a1865781a
commit
c7a14b4d1d
@ -1,25 +0,0 @@
|
||||
From b0129def51fede481dcb639373de3614b38f3130 Mon Sep 17 00:00:00 2001
|
||||
From: liqiuyu123 <liqiuyu@kylinos.cn>
|
||||
Date: Mon, 8 Aug 2022 14:30:17 +0800
|
||||
Subject: [PATCH] add setup.py
|
||||
|
||||
---
|
||||
setup.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
create mode 100644 setup.py
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
new file mode 100644
|
||||
index 0000000..bac24a4
|
||||
--- /dev/null
|
||||
+++ b/setup.py
|
||||
@@ -0,0 +1,6 @@
|
||||
+#!/usr/bin/env python
|
||||
+
|
||||
+import setuptools
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ setuptools.setup()
|
||||
--
|
||||
2.37.1.windows.1
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-tempora
|
||||
Version: 5.2.2
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Objects and routines pertaining to date and time (tempora)
|
||||
License: MIT
|
||||
URL: https://github.com/jaraco/tempora
|
||||
Source0: https://files.pythonhosted.org/packages/1c/32/963e37d9ad64582b822b8bf3288ac135ede936e5c8fe1c71da74164f0974/tempora-5.2.2.tar.gz
|
||||
Patch0: 0001-add-setup.py.patch
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: python3-pytz
|
||||
@ -30,7 +29,7 @@ Objects and routines pertaining to date and time (tempora).
|
||||
Summary: Objects and routines pertaining to date and time (tempora)
|
||||
Provides: python-tempora = %{version}-%{release}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pip python3-wheel python3-flit
|
||||
BuildRequires: python3-setuptools_scm
|
||||
BuildRequires: python3-toml
|
||||
%description -n python3-tempora
|
||||
@ -46,43 +45,26 @@ Objects and routines pertaining to date and time (tempora).
|
||||
%autosetup -n tempora-%{version} -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install tempora==%{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
|
||||
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 .
|
||||
|
||||
%files -n python3-tempora -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
%files -n python3-tempora
|
||||
%{python3_sitelib}/*
|
||||
%{_bindir}/calc-prorate
|
||||
|
||||
%files help -f doclist.lst
|
||||
%files help
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 27 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 5.2.2-2
|
||||
- Use pyproject to compile package
|
||||
|
||||
* Tue Apr 11 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 5.2.2-1
|
||||
- Update package to version 5.2.2
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user