Skip to content

Use setuptools instead of the removed distutils setup entry point - #299

Open
Aschenbath wants to merge 1 commit into
PyImageSearch:masterfrom
Aschenbath:codex/setuptools-setup-265
Open

Aschenbath wants to merge 1 commit into
PyImageSearch:masterfrom
Aschenbath:codex/setuptools-setup-265

Conversation

@Aschenbath

Copy link
Copy Markdown

Import setup from setuptools, replacing the deprecated standard-library distutils entry point removed in Python 3.12.

Fixes #265.

Validation on Python 3.12.12 with setuptools 84.2.1: without startup .pth hooks injecting a distutils alias, the original setup fails with ModuleNotFoundError; the updated setup reports the package name and version. Source and wheel distributions build successfully, and installing the wheel preserves metadata, all five packages (28 source modules) and the range-detector script. The existing description-file metadata warning remains and is addressed separately by #295. OpenCV runtime behavior was not changed or exercised.

OpenAI Codex assisted with investigation, validation and this change.

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.

distutils is deprecated in Python 3.10

1 participant