Skip to content

Commit 7548ad5

Browse files
are-cesclaude
andcommitted
Fix resource files not being installed with pip/uv
## Problem When installing via `pip install` or `uv add`, the resources folder was not being installed to site-packages. The YAML files were only included in the source tarball but not in the wheel distribution. ## Solution - Moved resources/ into lightspeed_stack_providers/ package - Added __init__.py files to make resources a proper Python package - Updated package-data configuration with explicit file listing (no wildcards) - Updated MANIFEST.in to reflect new location - Updated run.yaml and docker-compose.yml paths ## Security This approach is defensive: - Explicitly lists only the 6 required YAML files - No wildcards that could accidentally include sensitive files - Standard Python package structure using importlib.resources ## Testing Verified that: - All 6 YAML files are in the wheel - Files install correctly to site-packages - No unintended files (run.yaml, .env, etc.) are included Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b9602ce commit 7548ad5

19 files changed

Lines changed: 13 additions & 5 deletions

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
recursive-include resources *.yaml
1+
recursive-include lightspeed_stack_providers/resources *.yaml
22
include README.md

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- "8321:8321"
99
volumes:
1010
- ./run.yaml:/app/run.yaml
11-
- ./resources/external_providers:/app/providers.d
11+
- ./lightspeed_stack_providers/resources/external_providers:/app/providers.d
1212
environment:
1313
- OPENAI_API_KEY=${OPENAI_API_KEY}
1414
- EXTERNAL_PROVIDERS_DIR=/app/providers.d

lightspeed_stack_providers/resources/__init__.py

Whitespace-only changes.

lightspeed_stack_providers/resources/external_providers/__init__.py

Whitespace-only changes.

lightspeed_stack_providers/resources/external_providers/inline/__init__.py

Whitespace-only changes.

lightspeed_stack_providers/resources/external_providers/inline/agents/__init__.py

Whitespace-only changes.

resources/external_providers/inline/agents/lightspeed_inline_agent.yaml renamed to lightspeed_stack_providers/resources/external_providers/inline/agents/lightspeed_inline_agent.yaml

File renamed without changes.

lightspeed_stack_providers/resources/external_providers/inline/safety/__init__.py

Whitespace-only changes.

resources/external_providers/inline/safety/lightspeed_question_validity.yaml renamed to lightspeed_stack_providers/resources/external_providers/inline/safety/lightspeed_question_validity.yaml

File renamed without changes.

resources/external_providers/inline/safety/lightspeed_redaction.yaml renamed to lightspeed_stack_providers/resources/external_providers/inline/safety/lightspeed_redaction.yaml

File renamed without changes.

0 commit comments

Comments
 (0)