Name: goose-proxy Version: 0.1.0 Release: 1.20260416191236928463.pr50%{?dist} Summary: A proxy API for RHEL command line assistant License: Apache-2.0 AND GPL-3.0-or-later URL: https://github.com/rhel-lightspeed/goose-proxy Source: goose-proxy-0.1.0.tar.gz # Vendored dependency wheels. Using wheels (not sdists) avoids needing build # backends (hatchling, pdm-backend) and their transitive dependencies at build # time, which are not available in RHEL. Source1: https://files.pythonhosted.org/packages/26/a3/0bd5f0cdb0bbc92650e8dc457e9250358411ee5d1b65e42b6632387daf81/fastapi-0.136.0-py3-none-any.whl Source2: https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl Source3: https://files.pythonhosted.org/packages/82/2f/e68750da9b04856e2a7ec56fc6f034a5a79775e9b9a81882252789873798/pydantic-2.12.4-py3-none-any.whl Source4: https://files.pythonhosted.org/packages/0b/c9/584bc9651441b4ba60cc4d557d8a547b5aff901af35bda3a4ee30c819b82/starlette-1.0.0-py3-none-any.whl Source5: https://files.pythonhosted.org/packages/b7/23/a5bbd9600dd607411fa644c06ff4951bec3a4d82c4b852374024359c19c0/uvicorn-0.44.0-py3-none-any.whl Source6: https://files.pythonhosted.org/packages/da/42/e921fccf5015463e32a3cf6ee7f980a6ed0f395ceeaa45060b61d86486c2/anyio-4.13.0-py3-none-any.whl Source7: https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl Source8: https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl # pydantic-core is a compiled Rust extension. All arch/Python variants are listed # and pip selects the matching one via --find-links at install time. # RHEL 9 = Python 3.9 (cp39) Source10: https://files.pythonhosted.org/packages/c0/4a/412d2048be12c334003e9b823a3fa3d038e46cc2d64dd8aab50b31b65499/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Source11: https://files.pythonhosted.org/packages/d5/c2/aef51e5b283780e85e99ff19db0f05842d2d4a8a8cd15e63b0280029b08f/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Source12: https://files.pythonhosted.org/packages/71/0c/85bcbb885b9732c28bec67a222dbed5ed2d77baee1f8bba2002e8cd00c5c/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl # RHEL 10 = Python 3.12 (cp312) Source13: https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Source14: https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Source15: https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl # Build dependencies BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-wheel BuildRequires: pyproject-rpm-macros BuildRequires: systemd-units # Test dependencies BuildRequires: python3-pytest # Docs dependencies # Sphinx is used to build the manpages for the project. BuildRequires: python3-sphinx %global _description %{expand: A lightweight API translation proxy that bridges Goose with backend servers that speak the Responses API from OpenAI, such as Lightspeed Stack.} %description %_description %prep %autosetup -p1 -n goose-proxy-0.1.0 # Remove options from pytest as some of them are not available in Fedora at all sed -i '/^addopts = \[/,/^\]/d' pyproject.toml # Remove asyncio_mode as pytest-asyncio is not available in Fedora sed -i '/^asyncio_mode = /d' pyproject.toml # Swap the dynamic version property to version property, as we are pulling # sources from github and not a pypi distribution release. sed -i 's/^dynamic = \["version"\]/version = "%{version}"/' pyproject.toml # Drop extras from fastapi as standard-no-fastapi-cloud-cli is not available as # an extra in Fedora. sed -i 's/fastapi\[standard-no-fastapi-cloud-cli\]/fastapi/' pyproject.toml # Install vendored dependency wheels into the _vendor directory so they are # included in the wheel built by %%pyproject_wheel. %{python3} -m pip install --no-deps --target src/goose_proxy/_vendor \ %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} \ %{SOURCE7} %{SOURCE8} # Install pydantic-core to site-packages. It is a compiled Rust extension that # cannot live in _vendor. All arch/Python variants are provided as sources — pip # selects the one matching the build target automatically. mkdir -p _pydantic_core_wheels cp %{SOURCE10} %{SOURCE11} %{SOURCE12} \ %{SOURCE13} %{SOURCE14} %{SOURCE15} _pydantic_core_wheels/ %{python3} -m pip install --no-deps --no-index \ --find-links _pydantic_core_wheels pydantic_core %build %pyproject_wheel # Build the manpages sphinx-build -b man docs/man docs/build/man %install %pyproject_install %pyproject_save_files -l goose_proxy # Install the manpages for goose-proxy and goose-proxy-config %{__install} -D -m 0644 docs/build/man/%{name}-config.5 %{buildroot}%{_mandir}/man5/%{name}-config.5 %{__install} -D -m 0644 docs/build/man/%{name}.7 %{buildroot}%{_mandir}/man7/%{name}.7 # System units %{__install} -D -m 0644 data/release/systemd/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service # Config file %{__install} -d -m 0700 %{buildroot}/%{_sysconfdir}/xdg/%{name} %{__install} -D -m 0600 data/release/xdg/config.toml %{buildroot}/%{_sysconfdir}/xdg/%{name}/config.toml # Red Hat specific configs # Install the goose-init shell script inside /etc/profile.d for automatic # placement of the goose-config and custom_goose-proxy on user home directory. %{__install} -Dpm 0755 data/release/goose/goose-init.sh %{buildroot}%{_sysconfdir}/profile.d/goose-init.sh # Install the sources into /usr/share/goose-redhat %{__install} -Dpm 0644 data/release/goose/config.yaml %{buildroot}%{_datadir}/goose-redhat/config.yaml %{__install} -Dpm 0644 data/release/goose/custom_goose-proxy.json %{buildroot}%{_datadir}/goose-redhat/custom_goose-proxy.json %check %pytest %files -f %{pyproject_files} %{_bindir}/goose-proxy %doc README.md # Manpages %{_mandir}/man5/%{name}-config.5* %{_mandir}/man7/%{name}.7* # Needed directories %dir %attr(0700, root, root) %{_sysconfdir}/xdg/%{name} # System units %{_unitdir}/%{name}.service # Config file %config(noreplace) %attr(0600, root, root) %{_sysconfdir}/xdg/%{name}/config.toml # ---------------- Red Hat package %package -n goose-redhat Summary: %{summary} Requires: goose Requires: %{name} = %{version}-%{release} %description -n goose-redhat This package contains Red Hat specific configurations for %{name}, which enable the communication with RHEL Lightspeed services. %files -n goose-redhat %{_sysconfdir}/profile.d/goose-init.sh %{_datadir}/goose-redhat/config.yaml %{_datadir}/goose-redhat/custom_goose-proxy.json %changelog %autochangelog