Skip to content

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

Merged
Breakthrough merged 3 commits intoBreakthrough:mainfrom
frafra:pyproject-toml
Mar 2, 2026
Merged

[dist] Make dvr-scan installable via pyproject.toml.#205
Breakthrough merged 3 commits intoBreakthrough:mainfrom
frafra:pyproject-toml

Conversation

@frafra
Copy link
Contributor

@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
Contributor 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
Contributor 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 14 times, most recently from d6e1e57 to 5094906 Compare November 17, 2025 03:29
@Breakthrough Breakthrough force-pushed the main branch 13 times, most recently from 36b111d to cea454e Compare November 18, 2025 03:54
@Breakthrough Breakthrough force-pushed the main branch 2 times, most recently from 41baa78 to 80b931a Compare January 18, 2026 23:18
@frafra frafra marked this pull request as ready for review February 27, 2026 15:53
@frafra
Copy link
Contributor Author

frafra commented Feb 27, 2026

Hi @Breakthrough :) I found time to fix it. Rebased, updated. It works for me :)

Copy link
Owner

@Breakthrough Breakthrough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Let me first fix the headless build, but once that's done we can merge this as-is. Thank you!

@Breakthrough Breakthrough force-pushed the pyproject-toml branch 3 times, most recently from efd8113 to d3e9156 Compare March 1, 2026 03:22
@Breakthrough
Copy link
Owner

Everything seems to be working as intended, thanks for tackling this!

@Breakthrough Breakthrough merged commit 197b7ad into Breakthrough:main Mar 2, 2026
22 checks passed
@frafra frafra deleted the pyproject-toml branch March 2, 2026 11:21
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