On 7/7/26 4:45 PM, Aaron Conole wrote:
> Ilya Maximets <[email protected]> writes:
> 
>> Builds with modern setuptools generate the following warning:
>>
>>  setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers 
>> are deprecated.
>>  !!
>>
>>    
>> ********************************************************************************
>>    Please consider removing the following classifiers in favor of a SPDX 
>> license expression:
>>    License :: OSI Approved :: Apache Software License
>>    See 
>> https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
>>  for details.
>>    
>> ********************************************************************************
>>  !!
>>
>> The previous attempt to fix this warning was incorrect, as the
>> license_expression is not a classifier, and was reverted in commit
>> eb0a643f88cf ("Revert "python: Replace deprecated License with
>> License-Expression (PEP 639).".").
>>
>> Do it properly this time.  We need to remove the classifier and
>> replace the 'license' with the 'license_expression'.
>>
>> Specifying both fields is not really an option as systems like PyPi
>> will reject such packages.  So, just checking the setuptools version
>> at build time and choosing appropriate license description.
>> This should allow us to build the package on both old and new systems
>> without warnings and have complete metadata.
>>
>> Signed-off-by: Ilya Maximets <[email protected]>
>> ---
> 
> The PEP itself was a bit confusing to read, and the fact that we need to
> do this weird hack in setuptools is also strange to me, but
> unfortunately, we don't have a say.

Yeah, we either stay on the old way and have warnings or go the the
new way and have no license metadata on older systems.  Version
checking appears to be the only option that preserves proper metadata
without warnings and works on pypi.  At least, it works on the test
server, let's hope the main one accepts this as well, so we don't
have to revert again...

> 
> Reviewed-by: Aaron Conole <[email protected]>

Thanks!  Applied to main and 3.7, since it's our upcoming LTS.  May
backport further if needed, but doesn't seem necessary at the moment.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to