From c5037cad9f0a4540fe45269a1e1eac4857fff14e Mon Sep 17 00:00:00 2001 From: Ray Milkey Date: Mon, 3 May 2021 13:37:16 -0700 Subject: [PATCH] Merge ONF setup.py (#86) --- python/setup.py | 46 -------------------------------------------- setup.py | 51 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 63 deletions(-) delete mode 100644 python/setup.py diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index 088e323f..00000000 --- a/python/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-FileCopyrightText: 2021-present Open Networking Foundation -# -# SPDX-License-Identifier: LicenseRef-ONF-Member-1.0 - -from setuptools import setup, find_packages - -with open("./README.md") as f: - readme = f.read() - -with open("../VERSION") as f: - version = f.read() - -setup( - name="onos-api", - version=version, - description="ONOS Python API", - long_description=readme, - long_description_content_type="text/markdown", - author="Open Networking Foundation (ONF)", - packages=find_packages(exclude=("tests",)), - namespace_packages=[], - include_package_data=True, - keywords=["onos-api", "python", "protobuf", "gnmi"], - license="Apache License v2.0", - url="https://github.com/onosproject/onos-api/", - download_url="https://github.com/onosproject/onos-api/", - classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Other Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Topic :: Utilities", - "License :: OSI Approved :: Apache Software License", - ], - scripts=[], - install_requires=[ - "protobuf", - "grpclib", - "betterproto", - "gnmi-proto", - ], - python_requires=">=3.6", - setup_requires=["setuptools>=41.1.0"], -) diff --git a/setup.py b/setup.py index 2c53180d..9d491de2 100644 --- a/setup.py +++ b/setup.py @@ -1,34 +1,51 @@ -#!/usr/bin/env python +# SPDX-FileCopyrightText: 2021-present Open Networking Foundation +# +# SPDX-License-Identifier: LicenseRef-ONF-Member-1.0 -# SPDX-FileCopyrightText: © 2020 Open Networking Foundation -# SPDX-License-Identifier: Apache-2.0 +from setuptools import setup, find_packages -from setuptools import find_packages, setup - -PACKAGES = find_packages("python") +def readme(): + with open("./README.md") as f: + return f.read() def version(): with open("VERSION") as f: return f.read() - setup( name="onos-api", version=version(), - description="ONOS API for Python", - author="Open Networking Foundation and Partners", + description="ONOS Python API", + long_description=readme(), + long_description_content_type="text/markdown", + author="Open Networking Foundation (ONF) and Partners", author_email="support@opennetworking.org", - packages=[f"onos_api.{pkg}" for pkg in PACKAGES], - package_dir={f"onos_api.{pkg}": f"python/{pkg}".replace(".", "/") for pkg in PACKAGES}, - install_requires=["betterproto>=2.0.0b3,<3.0"], + packages=find_packages(exclude=("tests",)), + namespace_packages=[], + include_package_data=True, + keywords=["onos-api", "python", "protobuf", "gnmi"], + license="Apache License v2.0", + url="https://github.com/onosproject/onos-api/", + download_url="https://github.com/onosproject/onos-api/", classifiers=[ + "Development Status :: 4 - Beta", + "Environment :: Other Environment", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Utilities", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", ], + scripts=[], + install_requires=[ + "protobuf", + "grpclib", + "betterproto", + "gnmi-proto", + ], + python_requires=">=3.6", + setup_requires=["setuptools>=41.1.0"], ) - -