You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Install project in editable mode when using a pyproject.toml manifest automatically #1083
With regards to the CLI. I guess coming from pip, you would normally run pip install -e .. As a user you know pip install requires a list of requirements or editables. However, pixi install takes the set of requirements from a file and creates an environment which is a bit different of a command.
So I was wondering if it this might make it confusing, because you need an extra specifier with pip which you don't with pixi install. However, it might be the better default nonetheless.
Now that I'm reading more about it I think editable installs by default is the correct way to go. Prior art:
poetry expects a folder with the same name as the pkg. Or you can use the packages field in the pyproject.toml to include sources with a different name.
pdm init create a src folder with the same name as the package.
hatch also creates a src folder with the same name as the package.
Hi @garymm you are correct in the PR that closes this issue it was decided against an automatic install. Mainly because you can have multiple environments where you might not want an editable in all cases.
'pixi unit' does add it automatically to the .toml. If you find this behavior undesirable, feel free to make an issue where we can weigh the pro's and cons :)
Activity
tdejager commentedon Mar 29, 2024
With regards to the CLI. I guess coming from
pip, you would normally runpip install -e .. As a user you knowpip installrequires a list of requirements or editables. However,pixi installtakes the set of requirements from a file and creates an environment which is a bit different of a command.So I was wondering if it this might make it confusing, because you need an extra specifier with
pipwhich you don't withpixi install. However, it might be the better default nonetheless.Now that I'm reading more about it I think editable installs by default is the correct way to go. Prior art:
poetryexpects a folder with the same name as the pkg. Or you can use thepackagesfield in thepyproject.tomlto include sources with a different name.pdm initcreate asrcfolder with the same name as the package.hatchalso creates asrcfolder with the same name as the package.W.r.t build backends its much of the same thing, hatch's is pretty well documented: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection.
However,
setuptoolsallows all kinds of different configurations, although the documentation follows/recommends a similar approach as poetry.garymm commentedon Apr 10, 2024
This doesn't work for me with pixi
0.19.0.My pyproject.toml:
If I add this at the bottom, things work as expected:
How can I tell it doesn't work?
When do
pixi run pytestwithout the explicit editable dep, it fails withModuleNotFoundError.tdejager commentedon Apr 10, 2024
Hi @garymm you are correct in the PR that closes this issue it was decided against an automatic install. Mainly because you can have multiple environments where you might not want an editable in all cases.
'pixi unit' does add it automatically to the .toml. If you find this behavior undesirable, feel free to make an issue where we can weigh the pro's and cons :)