Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pixi Build Support #11548

Closed
saulshanabrook opened this issue Aug 15, 2024 · 5 comments
Closed

Add Pixi Build Support #11548

saulshanabrook opened this issue Aug 15, 2024 · 5 comments

Comments

@saulshanabrook
Copy link

saulshanabrook commented Aug 15, 2024

What's the problem this feature will solve?

I am switching to pixi and would like to use it to build my Sphinx docs in the RTD. It provides lockfiles and allows conda + pip installations of packages, and uses the uv resolver.

Describe the solution you'd like

It would be great to be able to specify pixi like you can with conda or pip in the read the docs config.

Alternative solutions

There is an alternative example posted in the Pixi docs (prefix-dev/pixi#1423), but it requires installing Pixi through conda and then running a custom command to build the docs using pixi.

Additional context

@humitos
Copy link
Member

humitos commented Aug 15, 2024

(quick reply from the phone)

You can use build.commands to install pixi and use it, see https://docs.readthedocs.io/en/latest/config-file/v2.html#build-commands for more info about build.commands

@akhmerov
Copy link

build.commands seems to not be compatible with reusing existing tools for sphinx or mkdocs. I believe the idea of this issue is to only have the environment provided by pixi without needing to replicate the rest of the build process.

@humitos
Copy link
Member

humitos commented Aug 16, 2024

I understand. We don't currently support that use case. Also, from past discussions I can say we won't implement this "natively" and expose a configuration option like python.install that uses pixi or uv or poetry or any other package manager.

Instead, we will be working on a way to override pre-defined jobs, like build.jobs.install, and support this use case in a more generic way that will allow you to use any package manager:

build:
  jobs:
    install:
      - pixi global install starship
      - pixi global install ruff

(read more about this idea in this other GitHub comment)

As a workaround until we implement this, I recommend you to follow similar steps than Poetry users: https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry or something around those lines. If you find a way to do this that you are happy with, feel free to open a PR to update that documentation page.

@pavelzw
Copy link

pavelzw commented Oct 7, 2024

with pixi now having an asdf plugin, we could just install it from there

see prefix-dev/pixi#1356 (comment)

@humitos
Copy link
Member

humitos commented Dec 3, 2024

Instead, we will be working on a way to override pre-defined jobs, like build.jobs.install, and support this use case in a more generic way that will allow you to use any package manager:

This was implemented in #11551, so users are able to use build.jobs.install 👍🏼

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

No branches or pull requests

4 participants