Comments (5)
Nice 🙌 I'm glad you got that worked out. I raised pypa/hatch#1293 re: this issue.
Let me know how you like the new uv
functionality, I've really enjoyed it so far - it's been a huge performance improvement.
from hatch-pip-compile.
Nice 🙌 I'm glad you got that worked out. I raised pypa/hatch#1293 re: this issue.
Let me know how you like the new
uv
functionality, I've really enjoyed it so far - it's been a huge performance emportement.
I was skeptical at first, but damn, it does make a difference, especially when you are using the same sets of dependencies in most of your projects. I was looking for support for it within Hatch directly and saw there was a pending issue on that. Luckily, today I was looking for something in the hatch-pip-compile docs and discovered you added support for it weeks ago. Frankly, bravo, thanks so much for your work.
from hatch-pip-compile.
How do you have hatch installed @Tobi-De?
If you have it installed with something like pipx
the following works (see https://juftin.com/hatch-pip-compile/notes/#manual-installation) (This is why I like pipx
best for hatch):
pipx runpip hatch install --upgrade hatch-pip-compile
If you have hatch installed with pip
then you'd have to just do a vanilla pip install --upgrade hatch-pip-compile
.
If you have hatch installed via the binary I believe you get less control over something like this and you'd have to add this to your hatch pyproject.toml
(you could change this back to "hatch"
after it has run once probably)
[tool.hatch.env]
requires = [
"hatch-pip-compile>=1.11.1"
]
from hatch-pip-compile.
Err, it seems that I started this without fully understanding your original comment. Some points to clarify:
hatch-pip-compile
runs inside the Python interpreter that is also running hatch. It accesses the virtual environments it creates but hatch-pip-compile
is not installed into those virtualenvs (pip-tools
/ uv
is installed into the virtualenvs though).
I tried uninstalling and reinstalling Hatch (with different methods: pip and binary) itself, but encountered the same issue
This one seems weird to me - maybe somehow the virtual environment that hatch lives in is getting persisted between these installs. hatch basically just runs a vanilla pip install hatch-pip-compile
when it sees the tool.hatch.env
table so maybe the virtualenv is never destroyed and thus never updated 🤷
Is it supposed to work automatically?
I think you're asking about whether hatch-pip-compile
gets updated automatically. It doesn't 😞 - I can create an issue for this upstream in hatch. Ideally you should be able to run something like:
hatch self run-pip --upgrade hatch-pip-compile
If yes, when does it happen?
I believe the [tool.hatch.env]
section only gets installed once, the first time it's called. I'm not 100% on this. I'll try to learn more
from hatch-pip-compile.
If you have hatch installed via the binary I believe you get less control over something like this and you'd have to add this to your hatch
pyproject.toml
(you could change this back to"hatch"
after it has run once probably)[tool.hatch.env] requires = [ "hatch-pip-compile>=1.11.1" ]
This worked, currently I have hatch installed via binary, I guessed the solution you suggested for pip will also work.
Thanks
I think you're asking about whether hatch-pip-compile gets updated automatically. It doesn't 😞 - I can create an issue for > this upstream in hatch. Ideally you should be able to run something like:
I don't know if it is possible, or maybe it will slow things down, but ideally the user won't have to think about it, but trying to update everything [tool.hatch.env]
everytime is probably not a good idea
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
- 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.