diff --git a/euler-copilot-rag-0.9.6.tar.gz b/euler-copilot-rag-0.9.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3969e33800a172188baf597a1552a0d3af020dc2 Binary files /dev/null and b/euler-copilot-rag-0.9.6.tar.gz differ diff --git a/euler-copilot-rag.spec b/euler-copilot-rag.spec new file mode 100644 index 0000000000000000000000000000000000000000..1e757f2aec1e5a2040b5a864856a304405ddc9fd --- /dev/null +++ b/euler-copilot-rag.spec @@ -0,0 +1,118 @@ +%define _python_bytecompile_skip 1 +Name: euler-copilot-rag +Version: 0.9.6 +Release: 1 +Summary: Document Parsing and Retrieval-Augmented Engine +License: MulanPSL-2.0 +URL: https://gitee.com/openeuler/euler-copilot-rag +Source0: %{name}-%{version}.tar.gz + +Requires: python3 +Requires: python3-aiofiles +Requires: python3-aiomysql +Requires: python3-asgi-correlation-id +Requires: python3-asyncpg +Requires: python3-beautifulsoup4 +Requires: python3-chardet +Requires: python3-cryptography +Requires: python3-fastapi +Requires: python3-fastapi-pagination +Requires: python3-httpx +Requires: python3-itsdangerous +Requires: python3-jieba +Requires: python3-langchain +Requires: python3-langchain-openai +Requires: python3-markdown +Requires: python3-markdown2 +Requires: python3-minio +Requires: python3-more-itertools +Requires: python3-numpy +Requires: python3-openai +Requires: python3-opengauss-sqlalchemy +Requires: python3-openpyxl +Requires: python3-pandas +Requires: python3-pgvector +Requires: python3-pillow +Requires: python3-psycopg2 +Requires: python3-pydantic +Requires: python3-python-docx +Requires: python3-dotenv +Requires: python3-python-multipart +Requires: python3-python-pptx +Requires: python3-pytz +Requires: python3-pyyaml +Requires: python3-redis +Requires: python3-requests +Requires: python3-scikit-learn +Requires: python3-sqlalchemy +Requires: python3-starlette +Requires: python3-tika +Requires: python3-tiktoken +Requires: python3-urllib3 +Requires: python3-uvicorn +Requires: python3-xlrd + + +%description +A document parsing and retrieval-augmented engine with 10+ format support, 7+ retrieval enhancement methods and automated testing pipeline. + + +%prep +%setup -b 0 -n %{name}-%{version} -q + + +%build +%define debug_package %{nil} + + +%pre +pip install opencv-python-headless -i https://mirrors.huaweicloud.com/repository/pypi/simple &> /dev/null + + +%post +pip install albucore albumentations paddleocr imgaug opencv-contrib-python opencv-python rapidfuzz pymupdf apscheduler \ + -i https://mirrors.huaweicloud.com/repository/pypi/simple &> /dev/null +echo -e "\033[0;32m%{name}-%{version}-%{release} installed successfully.\033[0m" + + +%install +mkdir -p -m 750 %{buildroot}%{_prefix}/lib/%{name} +mkdir -p -m 750 %{buildroot}%{_datadir}/doc/%{name} +mkdir -p -m 750 %{buildroot}%{_datadir}/licenses/%{name} +mkdir -p -m 750 %{buildroot}%{_sysconfdir}/%{name}/chat2db +mkdir -p -m 750 %{buildroot}%{_sysconfdir}/%{name}/data_chain + +cp -rf %{_builddir}/%{name}-%{version}/chat2db %{buildroot}%{_prefix}/lib/%{name} +cp -rf %{_builddir}/%{name}-%{version}/data_chain %{buildroot}%{_prefix}/lib/%{name} +install -m 0440 %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}%{_datadir}/licenses/%{name} +install -m 0440 %{_builddir}/%{name}-%{version}/README.md %{buildroot}%{_datadir}/doc/%{name} +mv %{buildroot}%{_prefix}/lib/%{name}/chat2db/common/.env.example %{buildroot}%{_sysconfdir}/%{name}/chat2db/env +mv %{buildroot}%{_prefix}/lib/%{name}/data_chain/common/.env.example %{buildroot}%{_sysconfdir}/%{name}/data_chain/env + +find %{buildroot}%{_prefix}/lib/%{name} -type d -exec chmod 750 {} \; +find %{buildroot}%{_prefix}/lib/%{name} -type f -exec chmod 640 {} \; +chmod 640 %{buildroot}%{_sysconfdir}/%{name}/chat2db/env +chmod 640 %{buildroot}%{_sysconfdir}/%{name}/data_chain/env + + +%files +%defattr(-,root,root,-) +%dir %{_prefix}/lib/%{name} +%dir %{_datadir}/doc/%{name} +%dir %{_datadir}/licenses/%{name} +%dir %{_sysconfdir}/%{name} +%dir %{_sysconfdir}/%{name}/chat2db +%dir %{_sysconfdir}/%{name}/data_chain + +%{_prefix}/lib/%{name}/* +%doc %{_datadir}/licenses/%{name}/LICENSE +%doc %{_datadir}/doc/%{name}/README.md +%config(noreplace) %{_sysconfdir}/%{name}/chat2db/env +%config(noreplace) %{_sysconfdir}/%{name}/data_chain/env + + +%changelog +%changelog +* Mon Jun 09 2025 liujiangbin - 0.9.6-1 +- Package Spec generated +