fix: add setup.py fallback for legacy setuptools to resolve UNKNOWN metadata warnings - #67
Merged
Merged
Conversation
…etuptools compatibility
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…d setuptools 83 deprecation warning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pip install logbar(andpip install PyPcre logbar datasets) was emitting repeatedWARNING: Generating metadata for package logbar produced metadata for project name unknownwarnings when the build ran against legacysetuptoolsthat could not readpyproject.toml[project]metadata (e.g. systemsetuptools59.6 on Ubuntu 22.04 orno-build-isolationinstalls). Without asetup.pyfallback, the metadata came back asUNKNOWN, causing pip to discard each candidate version.Changes
setup.pywith the canonicalLogBarmetadata (name,version,license,packages,python_requires, etc.) so legacysetuptoolscan build the package correctly even when it does not parsepyproject.toml.licenseasdynamicinpyproject.tomland provided it throughsetup.py(license="Apache-2.0"). This avoids thesetuptools83+ deprecation warning forproject.licenseas a TOML table while still being valid forsetuptools>=61.setuptoolslower bound from>=77.0.1to>=61since the PEP 639 SPDX feature is no longer used.Verification
pip install .succeeds with modernpip/setuptools build isolation.pip install . --no-build-isolationsucceeds on fresh venvs withsetuptools59.6, 60, 61, 65, 75, 80, 82, and 83, withName: LogBarand no license/UNKNOWN warnings.157 passed, 6 skipped.Link to Devin session: https://app.devin.ai/sessions/fd150f4dd61f470e96ff670b2dfe7649
Requested by: @Qubitium