1 Star 0 Fork 1

brucezhang/python-bsddb3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-bsddb3.spec 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
brucezhang 提交于 2024-09-04 17:52 +08:00 . Remove not used macors
%global srcname bsddb3
%global common_description %{expand:
This package contains Python wrappers for Berkeley DB, the Open Source embedded
database system. The Python wrappers allow you to store Python string objects of
any length.}
Name: python-%{srcname}
Version: 6.2.9
Release: 2%{?dist}
Summary: Python 3 bindings for Berkeley DB
License: BSD-3-Clause
URL: https://pypi.org/project/bsddb3
Source0: %{pypi_source}
Patch0: dont-include-standard-paths-in-runtime-libdir.patch
Patch1: TextTestResult.patch
BuildRequires: gcc libdb-devel python3-setuptools
%description %{common_description}
%global python3_name %{expand:python%{python3_pkgversion}-%{srcname}}
%package -n %{python3_name}
Summary: %{summary}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%description -n %{python3_name} %{common_description}
%prep
%autosetup -p1 -n %{srcname}-%{version}
%build
%{py3_build}
%install
fix_scripts_shebangs_and_permissions() {
local -r py_binary="$1"
local -r py_install_dir="$2"
local -r WRONG_SHEBANG='#!/usr/bin/python|#!/usr/bin/env python[[:digit:]]*'
local -r CORRECT_SHEBANG="#!${py_binary}"
grep --recursive --files-with-matches --null --extended-regexp \
--regexp="${WRONG_SHEBANG}" "${py_install_dir}" \
| xargs --null -- sed --regexp-extended --in-place \
--expression="s@${WRONG_SHEBANG}@${CORRECT_SHEBANG}@"
grep --recursive --files-with-matches --null --extended-regexp \
--regexp="${CORRECT_SHEBANG}" "${py_install_dir}" \
| xargs --null -- chmod 0755
%{py_byte_compile "${py_binary}" "${py_install_dir}"}
}
%{py3_install}
fix_scripts_shebangs_and_permissions %{__python3} \
%{buildroot}%{python3_sitearch}/%{srcname}
rm -f %{buildroot}%{_includedir}/python3.*/%{srcname}/bsddb.h
%check
%{__python3} test.py
%files -n %{python3_name}
%doc ChangeLog PKG-INFO README.txt
%license LICENSE.txt
%{python3_sitearch}/bsddb3/
%{python3_sitearch}/bsddb3-%{version}-py%{python3_version}.egg-info
%changelog
* Tue Sep 3 2024 Ze Zhang <bbrucezhang@tencent.com> - 6.2.9-2
- [Type] other
- [DESC] Remove not used macors
* Fri Apr 12 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 6.2.9-1
- initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bbrucezhang/python-bsddb3.git
git@gitee.com:bbrucezhang/python-bsddb3.git
bbrucezhang
python-bsddb3
python-bsddb3
master

搜索帮助