Skip to content

Conversation

@frafra
Copy link

@frafra frafra commented Feb 28, 2025

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 frafra marked this pull request as draft February 28, 2025 22:28
@frafra
Copy link
Author

frafra commented Feb 28, 2025

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.

@Breakthrough
Copy link
Owner

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.

@frafra
Copy link
Author

frafra commented Mar 1, 2025

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.

@Breakthrough Breakthrough force-pushed the main branch 2 times, most recently from d40559b to d8f084d Compare July 13, 2025 00:24
@Breakthrough
Copy link
Owner

Breakthrough commented Jul 17, 2025

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 Breakthrough force-pushed the main branch 4 times, most recently from 6ffa59e to 5cefd51 Compare August 17, 2025 02:28
@Breakthrough Breakthrough force-pushed the main branch 2 times, most recently from a38ce9d to 5711a36 Compare October 5, 2025 04:43
@Breakthrough Breakthrough force-pushed the main branch 11 times, most recently from c37e175 to 904dc78 Compare November 17, 2025 03:17
@Breakthrough Breakthrough force-pushed the main branch 21 times, most recently from 36b111d to cea454e Compare November 18, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish separate package for headless version, make opencv and pillow mandatory

2 participants