Adapting to the pyproject.toml compilation mode
This commit is contained in:
parent
eb81f7b6fd
commit
1b36667c31
@ -1,25 +0,0 @@
|
|||||||
From 343f2b3e776fe7742727f806fb3424a7c9a7851d Mon Sep 17 00:00:00 2001
|
|
||||||
From: jxy_git <jiangxinyu@kylinos.cn>
|
|
||||||
Date: Mon, 7 Nov 2022 15:23:19 +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..30c1b7b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -0,0 +1,6 @@
|
|
||||||
+#!/usr/bin/env python
|
|
||||||
+
|
|
||||||
+from setuptools import setup
|
|
||||||
+
|
|
||||||
+if __name__ == "__main__":
|
|
||||||
+ setup()
|
|
||||||
--
|
|
||||||
2.37.1
|
|
||||||
|
|
||||||
@ -3,13 +3,12 @@
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 2.1.0
|
Version: 2.1.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Basic/extra mitigation against the BREACH attack for Django projects
|
Summary: Basic/extra mitigation against the BREACH attack for Django projects
|
||||||
|
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
URL: http://github.com/lpomfrey/django-debreach
|
URL: http://github.com/lpomfrey/django-debreach
|
||||||
Source0: https://files.pythonhosted.org/packages/1f/1a/2bc5970d6b848c7ff4ab2932493a8e25bbed47f7668e4c3338152defc01a/django-debreach-2.1.0.tar.gz
|
Source0: https://files.pythonhosted.org/packages/1f/1a/2bc5970d6b848c7ff4ab2932493a8e25bbed47f7668e4c3338152defc01a/django-debreach-2.1.0.tar.gz
|
||||||
Patch0: 0001-add-setup.py.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -38,16 +37,15 @@ like django-ratelimit, the techniques here should provide at least some
|
|||||||
protection against the BREACH attack.
|
protection against the BREACH attack.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pypi_name}-%{version}
|
%autosetup -n %{pypi_name}-%{version} -p1
|
||||||
%patch0
|
|
||||||
# Remove bundled egg-info
|
# Remove bundled egg-info
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install %{pypi_name}==%{version}
|
||||||
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
|
||||||
@ -75,13 +73,17 @@ mv %{buildroot}/filelist.lst .
|
|||||||
mv %{buildroot}/doclist.lst .
|
mv %{buildroot}/doclist.lst .
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=. %{__python3} setup.py test
|
PYTHONPATH=. %{__python3} runtests.py
|
||||||
|
|
||||||
%files -n python3-%{pypi_name} -f filelist.lst
|
%files -n python3-%{pypi_name} -f filelist.lst
|
||||||
%dir %{python3_sitelib}/*
|
%dir %{python3_sitelib}/*
|
||||||
|
%{python3_sitelib}/debreach
|
||||||
%{_docdir}/python-%{pypi_name}/docs/*
|
%{_docdir}/python-%{pypi_name}/docs/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 5 2023 caodongxia <caodongxia@h-partners.com> - 2.1.0-2
|
||||||
|
- Adapting to the pyproject.toml compilation mode
|
||||||
|
|
||||||
* Mon Nov 07 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 2.1.0-1
|
* Mon Nov 07 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 2.1.0-1
|
||||||
- Upgrade package to version 2.1.0
|
- Upgrade package to version 2.1.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user