Acked-by: Alin Gabriel Serdean <[email protected]>
-----Original Message-----
From: Timothy Redaelli <[email protected]>
Sent: Friday, March 22, 2019 4:02 PM
To: [email protected]
Cc: Alin Serdean <[email protected]>; Lucian Petrut
<[email protected]>
Subject: [PATCH v2] python: Fix package requirements with old setuptools
Commit 00fcc832d598 ("Update Python package requirements") added a PEP 508
environment marker to install pywin32 on Windows systems.
This requires a new setuptools version (>= 20.5), but (at least)
RHEL/CentOS7 and Debian Jessie are using an older version of setuptools and
so python extension failed to build.
This commit adds "extras_require" instead of the PEP 508 environment markers
in order to have the conditional dependency of pywin32, but by remaining
compatible with the old setuptools versions.
CC: Alin Gabriel Serdean <[email protected]>
CC: Lucian Petrut <[email protected]>
Fixes: 00fcc832d598 ("Update Python package requirements")
Signed-off-by: Timothy Redaelli <[email protected]>
---
v1 -> v2:
- Use the more compatible PEP 496 environment marker "sys_platform"
instead of "platform_system".
---
python/setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/setup.py b/python/setup.py index 14814ca4a..b7252800c
100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -82,8 +82,8 @@ setup_args = dict(
ext_modules=[setuptools.Extension("ovs._json", sources=["ovs/_json.c"],
libraries=['openvswitch'])],
cmdclass={'build_ext': try_build_ext},
- install_requires=['sortedcontainers',
- 'pywin32>=1.0;platform_system=="Windows"'],
+ install_requires=['sortedcontainers'],
+ extras_require={':sys_platform == "win32"': ['pywin32 >= 1.0']},
)
try:
--
2.20.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev