Comments (8)
Confirmed, virtual
will leave dependencies behind and not uninstall them.
Yeah, I'll go ahead and make pip
the default, keeping the ability for pip-sync
. The plugin is called hatch-pip-compile
and not hatch-pip-compile-pip-sync
so I don't think it warrants a breaking change.
I'm thinking of pip-compile-installer
as the config option
from hatch-pip-compile.
Yeah I've never used pip-sync.
How does Hatch handle this in virtual environments? Does it uninstall anything?
from hatch-pip-compile.
Yeah I've never used pip-sync. How does Hatch handle this in virtual environments? Does it uninstall anything?
pip-sync
is the other side of pip-compile
but I haven't used it much before either. Yeah - it uninstalls everything not on the lockfile. This is also the reason why the plugin has to go through the extra step of reinstalling the project in dev mode, pip-sync
uninstalls that too.
from hatch-pip-compile.
How does Hatch handle this in virtual environments? Does it uninstall anything?
Oh, I see what you were asking before.
I don't think so - as far as I know it never performs an uninstall it just iterates through the dependencies
attribute and requests a pip install
if that dependency isn't detected in the environment
from hatch-pip-compile.
If so, sounds like pip-sync could be just dropped ¯\_(ツ)_/¯
Or make it be the opt-in
from hatch-pip-compile.
Meanwhile...
I got some totally bizarre interaction with uninstalling.
oprypin/mkdocs@28e19f3
->
https://github.com/oprypin/mkdocs/actions/runs/7076610215/job/19260039359
I have this:
[tool.hatch.envs.docs]
type = "pip-compile"
pip-compile-hashes = false
dependencies = [
...
]
[tool.hatch.envs.integration]
template = "docs"
I don't know why but it attempts to uninstall Hatch! And this fails only on Windows because only Windows cares that the process is trying to uninstall itself.
I actually realized one big problem with my setup that I just need to fix - for the integration
env I intended to use the requirements file of the docs
env, but actually it's still computed dynamically, so the lock file is missing. But why, if the lock file is missing, is it trying to uninstall Hatch?
from hatch-pip-compile.
Yeah, that is bizarre. It seems to me like pip-sync
is pointed at an empty lockfile and not a non-existent lockfile. When you run pip-sync
on an empty lockfile it basically uninstalls the whole environment.
I wonder if there is something different going on in windows
where it escapes the virtual environment differently than macOS / Linux
from hatch-pip-compile.
🎉 This issue has been resolved in version 1.7.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
from hatch-pip-compile.
Related Issues (20)
- ✨ optional hashes? HOT 6
- matrix environments with parent environment with different python version raise an error HOT 1
- depend on constraint env lockfile only if dependencies are present HOT 1
- Why is pip-tools being installed into the destination virtualenv? HOT 1
- pip complains about installing with `--no-deps`
- lockfile check not running HOT 8
- exhaustively check `dependencies_in_sync` HOT 1
- Specific Version of `pip-tools`
- Installation instructions not working HOT 13
- Regex error when installing pydantic as dependency HOT 5
- Lockfile Out Of Date between Windows vs. Linux HOT 3
- creating constraint environment without installing dependencies leaves it in bad state HOT 3
- "hatch env remove" leaves partial environment in place HOT 5
- "PIP_COMPILE_DISABLE" does not affect exit code HOT 8
- How can I use this plugin using hatch config `dirs.env.virtual`? HOT 2
- Use `uv` as locker / installer? HOT 1
- uv pip sync support
- singular uv install
- How can one update hatch-pip-compile itself ? HOT 5
- Recursive optional dependencies lead to incorrect requirements files HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hatch-pip-compile.