1 Star 0 Fork 20

zhangy1317/python-wrapt

forked from src-openEuler/python-wrapt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-wrapt.spec 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
zhangy1317 提交于 2021-05-10 11:34 . add spec and tar for python2 version
%global with_python3 0
%global with_docs 1
%{!?_licensedir: %global license %%doc}
Name: python-wrapt
Version: 1.10.8
Release: 1
Summary: A Python module for decorators, wrappers and monkey patching
License: BSD
URL: https://github.com/GrahamDumpleton/wrapt
Source0: https://github.com/GrahamDumpleton/wrapt/archive/1.10.8.tar.gz
BuildRequires: python2-devel
%if 0%{?with_python3}
BuildRequires: python3-devel
%endif
%description
The aim of the wrapt module is to provide a transparent object proxy
for Python, which can be used as the basis for the construction of
function wrappers and decorator functions.
%if 0%{?with_docs}
%package doc
Summary: Documentation for the wrapt module
BuildRequires: python-sphinx
BuildRequires: python-sphinx_rtd_theme
%description doc
Documentation for the wrapt module
%endif
%if 0%{?with_python3}
%package -n python3-wrapt
Summary: A Python module for decorators, wrappers and monkey patching
%description -n python3-wrapt
The aim of the wrapt module is to provide a transparent object proxy
for Python, which can be used as the basis for the construction of
function wrappers and decorator functions.
%endif
%prep
%setup -q -n wrapt-1.10.8
# Remove bundled egg-info in case it exists
rm -rf wrapt.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
popd
%endif
%if 0%{?with_docs}
# for docs
pushd docs
sphinx-build -b html -d build/doctrees . build/html
popd
%endif
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif
%{__python2} setup.py install --skip-build --root %{buildroot}
%files
%doc README.rst
%license LICENSE
%{python2_sitearch}/wrapt
%{python2_sitearch}/wrapt-1.10.8-py?.?.egg-info
%if 0%{?with_docs}
%files doc
%doc docs/build/html
%endif
%if 0%{?with_python3}
%files -n python3-wrapt
%doc README.rst
%license LICENSE
%{python3_sitearch}/wrapt
%{python3_sitearch}/wrapt-1.10.8-py?.?.egg-info
%endif
%changelog
* Thu Apr 29 2021 openstack-sig <openstack@openeuler.org>
- Package Spec generated
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangy1317/python-wrapt.git
git@gitee.com:zhangy1317/python-wrapt.git
zhangy1317
python-wrapt
python-wrapt
master

搜索帮助