diff options
author | Samuel O'Brien <sam.obrien@ni.com> | 2020-08-03 12:50:08 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-08-04 07:43:48 -0500 |
commit | 83ff556a543c444cdd3fb3cae6e975e8e74d015f (patch) | |
tree | e5be5ae3d702c768a309e5accd93bc1341d38e90 /host/python/setup.py.in | |
parent | 83508b80bd2a018781884f2b5773ce2118959d0f (diff) | |
download | uhd-83ff556a543c444cdd3fb3cae6e975e8e74d015f.tar.gz uhd-83ff556a543c444cdd3fb3cae6e975e8e74d015f.tar.bz2 uhd-83ff556a543c444cdd3fb3cae6e975e8e74d015f.zip |
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 <sam.obrien@ni.com>
Diffstat (limited to 'host/python/setup.py.in')
-rwxr-xr-x | host/python/setup.py.in | 8 |
1 files changed, 6 insertions, 2 deletions
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']) |