Equivalent of conda entry points in pixi.toml
when using pixi build
#3424
Unanswered
EugenePlanteurCS
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm working on converting a project from conda to pixi. Everything works out so far, but we want to still be able to build a conda package, that way users can choose either to
conda install
or clone the repo and runpixi install
. This project is only supposed to be used as a CLI tool, using entry points. When using pixi, we can just convert them to pixi tasks, but what about when building a conda package ?Let's take a simple example project:
For example,
meta.yaml
could contain:We can run
conda build meta.yaml
to build the corresponding conda package. Once installed in an evironment, one can usestart
to execute themain.py
file.The equivalent
pixi.toml
could look like this:In this case, we can then use
pixi run start
when installing it withpixi install
. But if we usepixi build
and install this package in a separate conda environment, there isn't really a "clean" way to callmain.py
. The easiest method would be to clone the project and runpython my_project/src/main.py
. I tried using the solution from this discussion, but I get the following error:So I'm guessing this section is only available for
project.toml
files, and notpixi.toml
? In any case, is there a "clean" way to implement entry points in thepixi.toml
, when usingpixi build
? I understand thatpixi build
is still heavily in development, so maybe this is something that will be added later?Thanks !
Beta Was this translation helpful? Give feedback.
All reactions