-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: PopPaul2021 <[email protected]>
- Loading branch information
1 parent
651e8d9
commit 5aa48fc
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="[email protected]", | ||
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", | ||
], | ||
) |