!1 新增Python-beniget包的源码包以及spec文件
From: @huangduirong Reviewed-by: @yangzhao_kl Signed-off-by: @yangzhao_kl
This commit is contained in:
commit
7028ee8458
19
0001-fix-rpmbuild-failed.patch
Normal file
19
0001-fix-rpmbuild-failed.patch
Normal file
@ -0,0 +1,19 @@
|
||||
From 4b0f2531a2dc78c57ceb65e3b224dc246c08dbde Mon Sep 17 00:00:00 2001
|
||||
From: huangduirong <huangduirong@huawei.com>
|
||||
Date: Wed, 25 Aug 2021 09:00:54 -0400
|
||||
Subject: [PATCH 1/1] fix rpmbuild failed
|
||||
|
||||
---
|
||||
beniget-0.4.1/requirements.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/beniget-0.4.1/requirements.txt b/beniget-0.4.1/requirements.txt
|
||||
index 6c43616..e7dff95 100644
|
||||
--- a/beniget-0.4.1/requirements.txt
|
||||
+++ b/beniget-0.4.1/requirements.txt
|
||||
@@ -1 +1 @@
|
||||
-gast ~= 0.5.0
|
||||
+gast>=0.5.0
|
||||
--
|
||||
2.27.0
|
||||
|
||||
BIN
beniget-0.4.1.tar.gz
Normal file
BIN
beniget-0.4.1.tar.gz
Normal file
Binary file not shown.
83
python-beniget.spec
Normal file
83
python-beniget.spec
Normal file
@ -0,0 +1,83 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-beniget
|
||||
Version: 0.4.1
|
||||
Release: 1
|
||||
Summary: Extract semantic information about static Python code
|
||||
License: BSD 3-Clause
|
||||
URL: https://github.com/serge-sans-paille/beniget/
|
||||
Source0: https://files.pythonhosted.org/packages/14/e7/50cbac38f77eca8efd39516be6651fdb9f3c4c0fab8cf2cf05f612578737/beniget-0.4.1.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: python3-gast
|
||||
|
||||
Patch0: 0001-fix-rpmbuild-failed.patch
|
||||
|
||||
%description
|
||||
A static analyzer for Python2 and Python3 code.
|
||||
Beniget provides a static over-approximation of the global and
|
||||
local definitions inside Python Module/Class/Function.
|
||||
It can also compute def-use chains from each definition.
|
||||
|
||||
%package -n python3-beniget
|
||||
Summary: Extract semantic information about static Python code
|
||||
Provides: python-beniget
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%description -n python3-beniget
|
||||
A static analyzer for Python2 and Python3 code.
|
||||
Beniget provides a static over-approximation of the global and
|
||||
local definitions inside Python Module/Class/Function.
|
||||
It can also compute def-use chains from each definition.
|
||||
|
||||
%package help
|
||||
Summary: Development documents and examples for beniget
|
||||
Provides: python3-beniget-doc
|
||||
%description help
|
||||
A static analyzer for Python2 and Python3 code.
|
||||
Beniget provides a static over-approximation of the global and
|
||||
local definitions inside Python Module/Class/Function.
|
||||
It can also compute def-use chains from each definition.
|
||||
|
||||
%prep
|
||||
%autosetup -n beniget-0.4.1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
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-beniget -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
|
||||
%files help -f doclist.lst
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Wed Aug 25 2021 Python_Bot <Python_Bot@openeuler.org>
|
||||
- Package Spec generated
|
||||
Loading…
x
Reference in New Issue
Block a user