Skip to content

Show a simple Pixi setup#477

Merged
antocuni merged 15 commits into
spylang:mainfrom
paugier:try-pixi
May 12, 2026
Merged

Show a simple Pixi setup#477
antocuni merged 15 commits into
spylang:mainfrom
paugier:try-pixi

Conversation

@paugier
Copy link
Copy Markdown
Contributor

@paugier paugier commented Apr 20, 2026

Related to #476

Setup a dev env

pixi run make-libspy
pixi shell
# or from everywhere
pixi shell -m ~/dev/spy

Other useful commands (with tab auto-completion)

pixi run fmt-py
pixi run check-lint
pixi run check-fmt
pixi run doc-serve
pixi run test-xdist

@paugier paugier force-pushed the try-pixi branch 2 times, most recently from 99056e5 to 1c1679b Compare April 20, 2026 22:00
@paugier paugier force-pushed the try-pixi branch 2 times, most recently from c78d490 to 42cd3ea Compare April 21, 2026 11:51
Copy link
Copy Markdown
Member

@antocuni antocuni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm super happy about this 🎉.
Left some minor comments.

Comment thread .github/workflows/tests-pixi.yml Outdated
- name: Run tests
run: |
pixi run pytest -n auto -m "not mypy" --junit-xml=test-results.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I understand correctly this PR runs the whole test suite twice (one with pixi, one with pip)?

I'd prefer to avoid that, I think it's enough a smoke test such as spy build -x examples/hello.spy to ensure that things generally work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified a lot the workflow checking Pixi setup. Only a smoke test is run.

Comment thread pyproject.toml
[tool.pixi.activation.env]
C_INCLUDE_PATH = "$PIXI_PROJECT_ROOT/.pixi/envs/default/include:$C_INCLUDE_PATH"
LIBRARY_PATH = "$PIXI_PROJECT_ROOT/.pixi/envs/default/lib:$LIBRARY_PATH"
DYLD_LIBRARY_PATH = "$PIXI_PROJECT_ROOT/.pixi/envs/default/lib:$DYLD_LIBRARY_PATH"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is needed to be able to link libgc?
If so, it's worth adding a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread pyproject.toml Outdated
test-xdist = "pytest -n auto -m 'not mypy'"
check-lint = "ruff check ."
check-fmt = "ruff format --check ."
fmt-py = "ruff format ."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never used pixi before so I don't know whether these are conventional names or ad-hoc.
If they are ad-hoc, what about usinf ruff-check, ruff-format-check and ruff-format? They look much more intuitive to me :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@antocuni antocuni merged commit 36c566c into spylang:main May 12, 2026
5 checks passed
@antocuni
Copy link
Copy Markdown
Member

@paugier after merging, the pixi workflow fails:
https://github.com/spylang/spy/actions/runs/25753173159

do you feel like investigating it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants