From 9c5f2c7b5110e492f775b1d7c26cf601c3e31b9b Mon Sep 17 00:00:00 2001 From: Lakshman Sundaralingam Date: Thu, 21 Jan 2021 16:20:52 -0800 Subject: [PATCH] Added root files to identity package --- .../azure-communication-identity/LICENSE.txt | 21 +++++ .../dev_requirements.txt | 7 ++ .../sdk_packaging.toml | 7 ++ .../azure-communication-identity/setup.cfg | 2 + .../azure-communication-identity/setup.py | 76 +++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 sdk/communication/azure-communication-identity/LICENSE.txt create mode 100644 sdk/communication/azure-communication-identity/dev_requirements.txt create mode 100644 sdk/communication/azure-communication-identity/sdk_packaging.toml create mode 100644 sdk/communication/azure-communication-identity/setup.cfg create mode 100644 sdk/communication/azure-communication-identity/setup.py diff --git a/sdk/communication/azure-communication-identity/LICENSE.txt b/sdk/communication/azure-communication-identity/LICENSE.txt new file mode 100644 index 000000000000..0313a903d76c --- /dev/null +++ b/sdk/communication/azure-communication-identity/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/dev_requirements.txt b/sdk/communication/azure-communication-identity/dev_requirements.txt new file mode 100644 index 000000000000..6feae79262c7 --- /dev/null +++ b/sdk/communication/azure-communication-identity/dev_requirements.txt @@ -0,0 +1,7 @@ +-e ../../../tools/azure-sdk-tools +-e ../../../tools/azure-devtools +-e ../../identity/azure-identity +../../core/azure-core +../azure-communication-nspkg +../azure-mgmt-communication +aiohttp>=3.0; python_version >= '3.5' \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/sdk_packaging.toml b/sdk/communication/azure-communication-identity/sdk_packaging.toml new file mode 100644 index 000000000000..5d4170e7bda2 --- /dev/null +++ b/sdk/communication/azure-communication-identity/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +auto_update = false +package_name = "azure-communication-identity" +package_pprint_name = "Communication Service" +package_doc_id = "" +is_stable = false +is_arm = false \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/setup.cfg b/sdk/communication/azure-communication-identity/setup.cfg new file mode 100644 index 000000000000..3480374bc2f2 --- /dev/null +++ b/sdk/communication/azure-communication-identity/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/setup.py b/sdk/communication/azure-communication-identity/setup.py new file mode 100644 index 000000000000..16d4f1a8f8f4 --- /dev/null +++ b/sdk/communication/azure-communication-identity/setup.py @@ -0,0 +1,76 @@ +from setuptools import setup, find_packages +import os +from io import open +import re + +# example setup.py Feel free to copy the entire "azure-template" folder into a package folder named +# with "azure-". Ensure that the below arguments to setup() are updated to reflect +# your package. + +# this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way +# up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging + +PACKAGE_NAME = "azure-communication-identity" +PACKAGE_PPRINT_NAME = "Communication Identity Service" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + long_description = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description_content_type='text/markdown', + + # ensure that these are updated to reflect the package owners' information + long_description=long_description, + url='https://github.com/Azure/azure-sdk-for-python', + author='Microsoft Corporation', + author_email='azuresdkengsysadmins@microsoft.com', + + license='MIT License', + # ensure that the development status reflects the status of your package + classifiers=[ + "Development Status :: 4 - Beta", + + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', + ], + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.communication' + ]), + install_requires=[ + "msrest>=0.6.0", + "azure-core<2.0.0,>=1.6.0", + ], + extras_require={ + ":python_version<'3.0'": ['azure-communication-nspkg'], + }, + project_urls={ + 'Bug Reports': 'https://github.com/Azure/azure-sdk-for-python/issues', + 'Source': 'https://github.com/Azure/azure-sdk-for-python', + } +) \ No newline at end of file