DVR-Scan icon indicating copy to clipboard operation
DVR-Scan copied to clipboard

[dist] Make dvr-scan installable via pyproject.toml.

Open frafra opened this issue 10 months ago • 4 comments

Migrate from the deprecated setup.py to pyproject.toml.

I did the migration using hatch, via uv tool run hatch new --init and did some minor adjustments.

It would be also possible to add optional dependencies, like opencv with pillow, but it is not possible to run dvr-scan without them, so I just made them mandatory, to reflect the current status of the software.

The tool can now be installed from git like using uv/uvx, like this:

uvx git+https://github.com/frafra/DVR-Scan.git@pyproject-toml

frafra avatar Feb 28 '25 21:02 frafra

I updated the Dockerfile, so that it builds from the source code, using uv, with caching, multi-staging etc.

I set the PR as draft, since I notice that not all the code is installed when building the container, and the dynamic versioning needs to be configured in pyproject.toml.

I also noticed that the dvr-scan-app entrypoint was not defined.

frafra avatar Feb 28 '25 22:02 frafra

Thanks for doing this, it's been on my radar for some time but I haven't gotten around to it yet.

I also noticed that the dvr-scan-app entrypoint was not defined.

Indeed, that's only in the develop and releases/1.7 branch right now. Would it be alright if we target this PR until after v1.7 is released? I plan on doing that this weekend so you should not have to wait long.

Breakthrough avatar Mar 01 '25 00:03 Breakthrough

Would it be alright if we target this PR until after v1.7 is released? I plan on doing that this weekend so you should not have to wait long.

I have no hurry, and the PR is not even complete, so that is totally fine to me.

frafra avatar Mar 01 '25 15:03 frafra

I had some issues converting to a pure pyproject.toml setup, but the project should overall function much better with uv now. Note that in the main branch I've changed the package structure a bit. I landed PR #222 using a UV-based build environment, and the project now uses UV for builds here on Github.

Would you be willing to rebase this PR to get it in for the next release? Thanks!

(P.S. Please let me know if you have any issues with uv out of the box now!)

Breakthrough avatar Jul 17 '25 23:07 Breakthrough