uhd/host/python/setup.py.in
Samuel O'Brien 83ff556a54 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>
2020-08-04 07:43:48 -05:00

34 lines
1.1 KiB
Python
Executable file

#!/usr/bin/env python3
#
# Copyright 2017-2018 Ettus Research, a National Instruments Company
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
"""Setup file for uhd module"""
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}',
description='Universal Software Radio Peripheral (USRP) Hardware Driver Python API',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: C++',
'Programming Language :: Python',
'Topic :: System :: Hardware :: Hardware Drivers',
],
keywords='SDR UHD USRP',
author='Ettus Research',
author_email='packages@ettus.com',
url='https://www.ettus.com/',
license='GPLv3',
package_dir={'': r'${NATIVE_CURRENT_BINARY_DIR}'},
package_data={'uhd': ['*.so']},
zip_safe=False,
packages=packages,
install_requires=['numpy'])