From 83ff556a543c444cdd3fb3cae6e975e8e74d015f Mon Sep 17 00:00:00 2001 From: Samuel O'Brien Date: Mon, 3 Aug 2020 12:50:08 -0500 Subject: python: Fix pyuhd to include subpackages Originally, the setup.py file for pyuhd listed only one package packages=['uhd'] the setuptools docs: https://setuptools.readthedocs.io/en/latest/setuptools.html#using-find-packages specify that this should also include subpackages, i.e uhd.dsp, uhd.usrp, etc. Currently, when packaging libpyuhd, we are not including the subpackages, and then when you run `import uhd`, it fails because uhd.usrp and uhd.dsp don't exist. This commit alleviates this issue by using setuptools.find_packages like the docs recommend. Signed-off-by: Samuel O'Brien --- host/python/setup.py.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'host/python/setup.py.in') diff --git a/host/python/setup.py.in b/host/python/setup.py.in index 505e8d199..39e284b4a 100755 --- a/host/python/setup.py.in +++ b/host/python/setup.py.in @@ -6,7 +6,11 @@ # """Setup file for uhd module""" -from setuptools import setup +from setuptools import setup, find_packages + +packages = find_packages() + +print("Including packages in pyuhd:", packages) setup(name='uhd', version='${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}', @@ -26,5 +30,5 @@ setup(name='uhd', package_dir={'': r'${NATIVE_CURRENT_BINARY_DIR}'}, package_data={'uhd': ['*.so']}, zip_safe=False, - packages=['uhd'], + packages=packages, install_requires=['numpy']) -- cgit v1.2.3