Require ply to build/install pynfs
Subsystems (2)
From a2ebd5b08a659c0a3367fbed7d62cad8ee9d273c Mon Sep 17 00:00:00 2001
From: Enji Cooper <[email protected]>
Date: Wed, 15 Feb 2023 16:21:29 -0800
Subject: [PATCH 17/17] Require ply to build/install pynfs
This particular change enforces the build/install check at two different levels to ensure that the subdirectory's dependencies are explicitly called out, and the overall build/install will halt if ply isn't present.
Sponsored by: Dell EMC Isilon
Signed-off-by Enji Cooper <[email protected]>
--- setup.py | 7 +++++++ xdr/setup.py | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)
setup.py +7 -0
@@ -6,6 +6,13 @@ import os import subprocess import sys +try: + import ply +except ImportError: + # Avoid confusing cascading failures due to how xdrgen is imported via + # setup.py files in subdirs. + sys.exit("You must install ply first.") + DESCRIPTION = """ pynfs ============
xdr/setup.py +7 -3
@@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from distutils.core import setup +from setuptools import setup DESCRIPTION = """ xdrgen
@@ -16,8 +16,12 @@ setup(name = "xdrgen", scripts = ["xdrgen.py"], # FIXME - make small script that calls module description = "Generate python code from .x files", long_description = DESCRIPTION, - #requires = "ply (>=2.0)", - + install_requires=[ + "ply >= 2.0", + ], + setup_requires=[ + "ply >= 2.0", + ], # These will be the same author = "Fred Isaman", author_email = "[email protected]",
Signature · 1 line
2.39.0