From 5aa48fce542fcc0717dbb0662615d79e2bf8381a Mon Sep 17 00:00:00 2001 From: PopPaul2021 Date: Tue, 22 Oct 2024 15:22:45 +0300 Subject: [PATCH] pyadi-iio: Adding setup.py file Signed-off-by: PopPaul2021 --- setup.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 setup.py diff --git a/setup.py b/setup.py new file mode 100755 index 000000000..791b015a6 --- /dev/null +++ b/setup.py @@ -0,0 +1,40 @@ +import re + +import setuptools + + +# From: https://github.com/smartcar/python-sdk/blob/master/setup.py +def _get_version(): + """Extract version from package.""" + with open("adi/__init__.py") as reader: + match = re.search( + r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', reader.read(), re.MULTILINE + ) + if match: + return match.group(1) + else: + raise RuntimeError("Unable to extract version.") + + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="pyadi-iio", + version=_get_version(), + author="Travis Collins", + author_email="travis.collins@analog.com", + description="Interfaces to stream data from ADI hardware", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/analogdevicesinc/pyadi-iio", + packages=setuptools.find_packages(exclude=["test*"]), + python_requires=">=3.6", + install_requires=["numpy>=1.20", "pylibiio==0.23.1"], + extras_require={"jesd": ["paramiko"]}, + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + ], +) \ No newline at end of file