Aaron Conole <[email protected]> writes:

> Timothy Redaelli via dev <[email protected]> writes:
>
>> PEP 639 deprecates the `License` field in favor of the more precise
>> `License-Expression`. This updates the metadata accordingly.
>>
>> https://peps.python.org/pep-0639/#deprecate-license-field
>>
>> Signed-off-by: Timothy Redaelli <[email protected]>
>> ---
>
> I'm trying to figure out how best to apply this.  What I mean is - pep
> 639 doesn't actually care about the python version, but it does care
> about the Core Metadata version standard (which needs specific support
> from python packaging infrastructure).
>
> When testing on a local system with python 3.9, I do get a correct
> License field::
>
>   Keywords: openvswitch,ovs,OVSDB
>   Platform: UNKNOWN
>   Classifier: Development Status :: 5 - Production/Stable
>   Classifier: Topic :: Database :: Front-Ends
>   Classifier: Topic :: Software Development :: Libraries :: Python Modules
>   Classifier: Topic :: System :: Networking
>   Classifier: License-Expression :: Apache 2.0
>   Classifier: Programming Language :: Python :: 3
>   Classifier: Programming Language :: Python :: 3.7
>   Description-Content-Type: text/x-rst
>   Provides-Extra: dns
>   Provides-Extra: flow
>   Provides-Extra: flowviz
>   [root@backuppc ovs-3.6.90-py3.9.egg-info]# pip3 show ovs
>   Name: ovs
>   Version: 3.6.90
>   Summary: Open vSwitch library
>   Home-page: http://www.openvswitch.org/
>   Author: Open vSwitch
>   Author-email: [email protected]
>   License: Apache 2.0
>   Location: /usr/local/lib/python3.9/site-packages
>   Requires: sortedcontainers
>   Required-by: 
>
> My question is, should we be bumping the minimum required python version
> along with this as well (at least maybe to 3.9).  I don't have a python
> 3.7 distro available currently (and our minimum version is 3.7).
>
> The harder part on this is that as spelled out in the PEP and comments,
> it isn't tied to the python version, so in theory a 3.7 python
> distribution should work fine as long as it has support for Core
> Metadata 2.4
>
> Thoughts?

I tested this on RHEL8.8 as well (which is a python 3.6 based distro, so
required a bit of hacking to get it to 'build') and got the following
result for pip3:

  [root@wsfd-advnetlab09 python]# pip3 show -vvv ovs
  Name: ovs
  Version: 3.6.90
  Summary: Open vSwitch library
  Home-page: http://www.openvswitch.org/
  Author: Open vSwitch
  Author-email: [email protected]
  License: Apache 2.0
  Location: /usr/local/lib/python3.6/site-packages
  Requires: sortedcontainers
  Metadata-Version: 2.1
  Installer: 
  Classifiers:
    Development Status :: 5 - Production/Stable
    Topic :: Database :: Front-Ends
    Topic :: Software Development :: Libraries :: Python Modules
    Topic :: System :: Networking
    License-Expression :: Apache 2.0
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3.7

Importantly, it seems like the license details are correct.  So I don't
think we need to make any adjustments to get the proper licensing
details.  While it will be important that the Core Metadata version is
updated, I think that's probably okay on even older distros.

I plan to apply this unless anyone objects (but I might note the Core
Metadata requirement in the commit message if Ilya/Eelco/Simon think it
makes sense).

>>  python/setup.py.template | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/python/setup.py.template b/python/setup.py.template
>> index e28d5d397..0a7849b4e 100644
>> --- a/python/setup.py.template
>> +++ b/python/setup.py.template
>> @@ -97,7 +97,7 @@ setup_args = dict(
>>          'Topic :: Database :: Front-Ends',
>>          'Topic :: Software Development :: Libraries :: Python Modules',
>>          'Topic :: System :: Networking',
>> -        'License :: OSI Approved :: Apache Software License',
>> +        'License-Expression :: Apache 2.0',
>>          'Programming Language :: Python :: 3',
>>          'Programming Language :: Python :: 3.7',
>>      ],

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to