Adapting to the pyproject.toml compilation mode

This commit is contained in:
wu-leilei 2023-05-11 11:25:39 +08:00
parent dc374ed6ae
commit 8472943fba
2 changed files with 11 additions and 39 deletions

View File

@ -1,14 +1,13 @@
%global _empty_manifest_terminate_build 0 %global _empty_manifest_terminate_build 0
Name: python-Flask-SQLAlchemy Name: python-Flask-SQLAlchemy
Version: 3.0.3 Version: 3.0.3
Release: 1 Release: 2
Summary: Adds SQLAlchemy support to your Flask application. Summary: Adds SQLAlchemy support to your Flask application.
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/pallets/flask-sqlalchemy URL: https://github.com/pallets/flask-sqlalchemy
Source0: https://files.pythonhosted.org/packages/7a/33/b0418aaeb6b122fccfdea1bf3c06843225ba29159b65c0acf9bd4285ee01/Flask-SQLAlchemy-3.0.3.tar.gz Source0: %{pypi_source Flask-SQLAlchemy}
Source1: setup.py
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-pip python3-wheel python3-pdm-pep517
Requires: python3-Flask Requires: python3-Flask
Requires: python3-SQLAlchemy Requires: python3-SQLAlchemy
@ -40,47 +39,29 @@ easier to accomplish common tasks.
%prep %prep
%autosetup -n Flask-SQLAlchemy-%{version} -p1 %autosetup -n Flask-SQLAlchemy-%{version} -p1
cp %{SOURCE1} ./
%build %build
%py3_build %pyproject_build
%install %install
%py3_install %pyproject_install
install -d -m755 %{buildroot}/%{_pkgdocdir} install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{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 example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{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-Flask-SQLAlchemy -f filelist.lst %files -n python3-Flask-SQLAlchemy
%license LICENSE.rst %license LICENSE.rst
%dir %{python3_sitelib}/* %{python3_sitelib}/*
%files help -f doclist.lst %files help
%{_pkgdocdir} %{_pkgdocdir}
%changelog %changelog
* Thu May 11 2023 wulei <wu_lei@hoperun.com> - 3.0.3-2
- Adapting to the pyproject.toml compilation mode
* Fri Mar 17 2023 wubijie <wubijie@kylinos.cn> - 3.0.3-1 * Fri Mar 17 2023 wubijie <wubijie@kylinos.cn> - 3.0.3-1
- Update package to version 3.0.3 - Update package to version 3.0.3

View File

@ -1,9 +0,0 @@
#!/usr/bin/env python
import setuptools
if __name__ == "__main__":
setuptools.setup(
name="Flask-SQLAlchemy",
version="3.0.2",
)