On Wed, Jan 28, 2026 at 01:01:20AM +0100, Timothy Redaelli via dev wrote: > Currently, the 'ovstest' package is not included in the default setup.py > configuration. However, downstream packaging guidelines (such as the new > Fedora Python Packaging Guidelines [1]) imply that all files installed > into Python library directories should be managed by standard PyPA tools > like setuptools. > > Add support for the 'enable_ovstest' environment variable. When set, > 'ovstest' is added to the 'packages' list in setup.py. This allows > packagers to optionally install this module using standard Python build > mechanisms. > > This package is a dependency for utilities such as 'ovs-l3ping' and > 'ovs-test'.
Hi Timothy. Have you considered creating another python package? It feels strage to modify the source code of a package with an env var. Thanks. -- Adrián > > [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ > > Signed-off-by: Timothy Redaelli <[email protected]> > --- > python/setup.py.template | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/python/setup.py.template b/python/setup.py.template > index 0a7849b4e..dea574d63 100644 > --- a/python/setup.py.template > +++ b/python/setup.py.template > @@ -118,6 +118,10 @@ setup_args = dict( > package_data={'ovs.flowviz': ['ovs-flowviz.conf']}, > ) > > +# Conditional build option: Add 'ovstest' to packages if requested > +if os.environ.get('enable_ovstest') == 'yes': > + setup_args['packages'].append('ovstest') > + > try: > setuptools.setup(**setup_args) > except BuildFailed: > -- > 2.52.0 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
