diff --git a/euler-copilot-shell-0.9.2.tar.gz b/euler-copilot-shell-0.9.2.tar.gz index 14535dac8cb07c331ecd1cb21899dd6a81e15b86..eb54fbdc967c888689f162669636a90b16200b94 100644 Binary files a/euler-copilot-shell-0.9.2.tar.gz and b/euler-copilot-shell-0.9.2.tar.gz differ diff --git a/euler-copilot-shell.spec b/euler-copilot-shell.spec index b3b0b068634027b4f7e738fd2438150cd9c3efd4..51614d56fba0a8c6b3fac9fb75488602a5189aa0 100644 --- a/euler-copilot-shell.spec +++ b/euler-copilot-shell.spec @@ -2,36 +2,41 @@ Name: euler-copilot-shell Version: 0.9.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: EulerCopilot 命令行助手 License: MulanPSL-2.0 URL: https://www.openeuler.org/zh/ Group: Applications/Utilities Source0: %{name}-%{version}.tar.gz BuildArch: aarch64 x86_64 -Requires: python3, jq, hostname +BuildRequires: python3-devel python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-Cython gcc +Requires: python3 jq hostname %description EulerCopilot 提供了命令行助手,旨在为 openEuler 提供智能辅助工具。 %prep %setup -q +python3 -m venv .venv +.venv/bin/python3 -m pip install -U -i https://mirrors.huaweicloud.com/repository/pypi/simple pip setuptools +.venv/bin/python3 -m pip install -U -i https://mirrors.huaweicloud.com/repository/pypi/simple Cython pyinstaller +.venv/bin/python3 -m pip install -U -i https://mirrors.huaweicloud.com/repository/pypi/simple websockets requests +.venv/bin/python3 -m pip install -U -i https://mirrors.huaweicloud.com/repository/pypi/simple rich typer questionary %build +.venv/bin/python3 setup.py build_ext +.venv/bin/pyinstaller --onefile --clean \ + --distpath=%{_builddir}/%{name}-%{version}/dist \ + --workpath=%{_builddir}/%{name}-%{version}/build \ + copilot.py %install -rm -rf %{buildroot} %define _unpackaged_files_terminate_build 0 install -d %{buildroot}/%{_bindir} - -# 安装 CLI 组件 +install -c -m 0755 %{_builddir}/%{name}-%{version}/dist/copilot %{buildroot}/%{_bindir} install -d %{buildroot}/etc/profile.d -%ifarch aarch64 -install -c -m 0755 %{_builddir}/%{name}-%{version}/aarch64/copilot %{buildroot}/%{_bindir} -%endif -%ifarch x86_64 -install -c -m 0755 %{_builddir}/%{name}-%{version}/x86_64/copilot %{buildroot}/%{_bindir} -%endif install -c -m 0755 %{_builddir}/%{name}-%{version}/eulercopilot.sh %{buildroot}/etc/profile.d %files @@ -62,5 +67,8 @@ if [ ! -f /usr/bin/copilot ]; then fi %changelog +* Fri Feb 28 2025 Hongyu Shi - 0.9.2-6 +- Update build 6 + * Mon Feb 24 2025 Hongyu Shi - 0.9.2-5 - Add euler-copilot-shell