Skip to content
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

build: migrate to uv, standardize packging #415

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mokurin000
Copy link

@mokurin000 mokurin000 commented Oct 17, 2024

Sorry for this PR without an issue, I will create an issue later when I am available

For short, the nonstandard source tree annoyed me for fifteen minutes figuring out failed to find module "backend" by directory or filename

The output of poetry install:

Warning: The current project could not be installed: No file/folder found for package backend
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.

In a future version of Poetry this warning will become an error!

Changes/Reason

  1. Standardize packaging

This will fix the above problem, in the best way
Also, previously we use absolute module name to import a local module, which will make the program only able to be executed at backend/

  1. Migrate to uv

Poetry does not support standard project metadata format at all.
It will just throw:

[tool.poetry] section not found in C:/Users/<retracted>/Documents/Repos/screenshot-to-code/backend/pyproject.toml 

PDM is also applicable to applications.

  1. Build backend changed to setuptools (default fallback)

This is mainly a side-effect of 1.. But we need no plugins support, no C/C++/Rust Extensions, so setuptools is just enough

@mokurin000 mokurin000 marked this pull request as ready for review October 17, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant