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
It would appear that pip-deepfreeze tries to install the local package in editable mode:
pip install -e .
Unfortunately, I have a case where this does not work reliably. The reason being that I have multiple local packages which pip does not resolve well. The reason being that pip believes packages to be conflicting if one package is installed in editable mode, and the other is installed in non-editable mode from a path. There are also issues where pip believes there is a conflict if the paths are not identical (e.g. /src/pkg-b/../pkg-a and /src/pkg-a are the same, but pip will see a conflict).
I could not see an option with pip-deepfreeze to allow a non-editable installation. Could this be added behind a flag?
The text was updated successfully, but these errors were encountered:
Given the issues you mention I'm not quite sure installing in non-editable mode would help much.
If I understand your use case you are in some sort of monorepo setup.
I'm interested in making pip-df work better in such situations.
The first thing I would try, if possible for you, is to declare "abstract" dependencies in the pyproject.toml of each package, i.e. only the package name (pkg-a, pkg-b). Then in requirements.txt.in, constrain each of it to a concrete path.
So, if pkg-b is your main project where you want to freeze, and it depends on pkg-a, add dependencies = ["pkg-a"] to pkg-b's pyproject.toml, and -e file://${PWD}/../pkg-a#egg=pkg-a to requirements.txt.in.
Then you will probably need to filter out pkg-a from the resulting requirements.txt with a post-sync command.
This is somewhat hacky but should work. One thing we could do is add some support for "local" dependencies to pip-deepfreeze that would do the hacking for you.
Let me know if did understand your use case correctly.
It would appear that
pip-deepfreeze
tries to install the local package in editable mode:pip install -e .
Unfortunately, I have a case where this does not work reliably. The reason being that I have multiple local packages which
pip
does not resolve well. The reason being thatpip
believes packages to be conflicting if one package is installed in editable mode, and the other is installed in non-editable mode from a path. There are also issues wherepip
believes there is a conflict if the paths are not identical (e.g./src/pkg-b/../pkg-a
and/src/pkg-a
are the same, butpip
will see a conflict).I could not see an option with
pip-deepfreeze
to allow a non-editable installation. Could this be added behind a flag?The text was updated successfully, but these errors were encountered: