5 Star 0 Fork 2

src-openEuler/python-pdc-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
pdc-client.spec 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
sqfu 提交于 2024-11-19 17:39 . init package
%global plugin_install_path %{_datadir}/pdc-client/plugins
# Disable automatic byte-compilation of plugins
%global _python_bytecompile_extra 0
Name: pdc-client
Version: 1.8.0
Release: 1
Summary: Console client for interacting with Product Definition Center
License: MIT
URL: https://github.com/product-definition-center/pdc-client
BuildArch: noarch
Source0: https://files.pythonhosted.org/packages/source/p/pdc-client/pdc-client-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-requests
BuildRequires: python3-requests-kerberos
Requires: python3-pdc-client = %{version}-%{release}
%description
This client package contains two separate Product Definition Center clients and
API module. Both clients contain extensive built-in help. Just run the
executable with -h or --help argument.
%package -n python3-pdc-client
Summary: Python 3 client library for Product Definition Center
Requires: python3-beanbag
Requires: python3-requests-kerberos
Requires: pdc-client
%description -n python3-pdc-client
This is a python module for interacting with Product Definition Center
programatically. It can handle common authentication and configuration of PDC
server connections
%prep
%setup -q -n pdc-client-%{version}
# Replace installation plugin path in code
sed -i 's|^DEFAULT_PLUGIN_DIR = .*|DEFAULT_PLUGIN_DIR = "%{plugin_install_path}"|' \
pdc_client/runner.py
%build
%py3_build
%install
%py3_install
# Plugins are only required in the "pdc" script (not the Python packages). So
# move plugins to pdc-client package from Python package (this should also
# contain compiled bytecode).
mkdir -p %{buildroot}/%{plugin_install_path}
mv -T %{buildroot}/%{python3_sitelib}/pdc_client/plugins %{buildroot}/%{plugin_install_path}
mkdir -p %{buildroot}/%{_mandir}/man1
cp docs/pdc_client.1 %{buildroot}/%{_mandir}/man1/
mkdir -p %{buildroot}/%{_sysconfdir}/bash_completion.d/
cp pdc.bash %{buildroot}/%{_sysconfdir}/bash_completion.d/
mkdir -p %{buildroot}/%{_sysconfdir}/pdc.d
%files
%doc README.markdown
%{_mandir}/man1/pdc_client.1*
%{_sysconfdir}/bash_completion.d
%dir %{_sysconfdir}/pdc.d
%{_bindir}/pdc
%{_bindir}/pdc_client
%dir %{_datadir}/pdc-client
%dir %{plugin_install_path}
%{plugin_install_path}/*
%files -n python3-pdc-client
%doc README.markdown
%license LICENSE
%{python3_sitelib}/pdc_client*
%changelog
* Mon Nov 18 2024 sqfu <dev01203@linx-info.com> - 1.8.0-1
- init package
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/python-pdc-client.git
git@gitee.com:src-openeuler/python-pdc-client.git
src-openeuler
python-pdc-client
python-pdc-client
master

搜索帮助