-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate dependencies from Pipfile to uv / pyproject #212
base: master
Are you sure you want to change the base?
Conversation
KerfleweyWhy the heck is hatch complaining? Did I ask to use hatch somehow? p.s. see discord discussion $ uv run -- ./site serve
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: madmode-blog @ file:///home/connolly/projects/madmode-blog
Caused by: Build backend failed to build wheel through `build_editable()` with exit status: 1
--- stdout:
--- stderr:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/build.py", line 83, in build_editable
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 155, in build
artifact = version_api[version](directory, **build_data)
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/wheel.py", line 494, in build_editable
return self.build_editable_detection(directory, **build_data)
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/wheel.py", line 505, in build_editable_detection
for included_file in self.recurse_selected_project_files():
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 180, in recurse_selected_project_files
if self.config.only_include:
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/config.py", line 806, in only_include
only_include = only_include_config.get('only-include', self.default_only_include()) or self.packages
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/wheel.py", line 260, in default_only_include
return self.default_file_selection_options.only_include
File "/usr/lib/python3.10/functools.py", line 981, in __get__
val = self.func(instance)
File "/home/connolly/.cache/uv/builds-v0/.tmpRm3oOY/lib/python3.10/site-packages/hatchling/builders/wheel.py", line 248, in default_file_selection_options
raise ValueError(message)
ValueError: Unable to determine which files to ship inside the wheel using the following heuristics: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection
The most likely cause of this is that there is no directory that matches the name of your project (madmode_blog).
At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: https://hatch.pypa.io/latest/config/build/
As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of your project, you can define the following:
[tool.hatch.build.targets.wheel]
packages = ["src/foo"]
--- for ref: 4fb8a09 |
$ uv init --virtual $ uv add --dev argh flask frozen-flask flask-flatpages flask-markdown flask-assets pillow markdown markupsafe importlib_metadata
vitual project still losingSeems like progress, but... $ uv run -- ./site serve
Traceback (most recent call last):
File "/home/connolly/projects/madmode-blog/./site", line 20, in <module>
from flaskext.markdown import Markdown
File "/home/connolly/projects/madmode-blog/.venv/lib/python3.10/site-packages/flaskext/markdown.py", line 32, in <module>
from flask import Markup
ImportError: cannot import name 'Markup' from 'flask' (/home/connolly/projects/madmode-blog/.venv/lib/python3.10/site-packages/flask/__init__.py) p.s. another clue from discord flask 2.* vs. 3.*
p.p.s. |
|
What does Nicolas use? Jekyll!
|
Discovered uv via lobste.rs discussion. Looks cool.
I'm not really pushing the envelope, so stuff like deployment to netlify just works with a Pipfile that I've been using at least as far back as 2019, thru a python 2.7 -> 3.x transition.
But I've been concerned for some time that my dependencies are a little fragile (#14). Let's see how well uv handles them.
refs: