代码拉取完成,页面将自动刷新
%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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。