diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c80b4a39aafa..76e78dc3ebf7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -27,5 +27,6 @@ /azure-mgmt-servicefabric/ @QingChenmsft /azure-mgmt-sql/ @jaredmoo /azure-mgmt-web/ @yugangw-msft +/azure-security-keyvault/ @chlowell @schaabs /azure-servicebus/ @annatisch /azure-servicefabric/ @samedder diff --git a/azure-security-keyvault/HISTORY.md b/azure-security-keyvault/HISTORY.md new file mode 100644 index 000000000000..1333ed77b7e1 --- /dev/null +++ b/azure-security-keyvault/HISTORY.md @@ -0,0 +1 @@ +TODO diff --git a/azure-security-keyvault/MANIFEST.in b/azure-security-keyvault/MANIFEST.in new file mode 100644 index 000000000000..eb02fc604461 --- /dev/null +++ b/azure-security-keyvault/MANIFEST.in @@ -0,0 +1,4 @@ +include *.md +include azure/__init__.py +include azure/security/__init__.py +include azure/security/keyvault/__init__.py diff --git a/azure-security-keyvault/README.md b/azure-security-keyvault/README.md new file mode 100644 index 000000000000..b7bb2c55c288 --- /dev/null +++ b/azure-security-keyvault/README.md @@ -0,0 +1,13 @@ +# Azure Key Vault client library for Python + +# Getting started + +# Key concepts + +# Examples + +# Troubleshooting + +# Next steps + +# Contributing diff --git a/azure-security-keyvault/azure/__init__.py b/azure-security-keyvault/azure/__init__.py new file mode 100644 index 000000000000..53cba84ea20f --- /dev/null +++ b/azure-security-keyvault/azure/__init__.py @@ -0,0 +1,2 @@ +# pylint:disable=missing-docstring +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/azure-security-keyvault/azure/security/__init__.py b/azure-security-keyvault/azure/security/__init__.py new file mode 100644 index 000000000000..53cba84ea20f --- /dev/null +++ b/azure-security-keyvault/azure/security/__init__.py @@ -0,0 +1,2 @@ +# pylint:disable=missing-docstring +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/azure-security-keyvault/azure/security/keyvault/__init__.py b/azure-security-keyvault/azure/security/keyvault/__init__.py new file mode 100644 index 000000000000..5b396cd202e8 --- /dev/null +++ b/azure-security-keyvault/azure/security/keyvault/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- diff --git a/azure-security-keyvault/azure/security/keyvault/certificates/__init__.py b/azure-security-keyvault/azure/security/keyvault/certificates/__init__.py new file mode 100644 index 000000000000..5b396cd202e8 --- /dev/null +++ b/azure-security-keyvault/azure/security/keyvault/certificates/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- diff --git a/azure-security-keyvault/azure/security/keyvault/keys/__init__.py b/azure-security-keyvault/azure/security/keyvault/keys/__init__.py new file mode 100644 index 000000000000..5b396cd202e8 --- /dev/null +++ b/azure-security-keyvault/azure/security/keyvault/keys/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- diff --git a/azure-security-keyvault/azure/security/keyvault/secrets/__init__.py b/azure-security-keyvault/azure/security/keyvault/secrets/__init__.py new file mode 100644 index 000000000000..5b396cd202e8 --- /dev/null +++ b/azure-security-keyvault/azure/security/keyvault/secrets/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- diff --git a/azure-security-keyvault/azure/security/keyvault/version.py b/azure-security-keyvault/azure/security/keyvault/version.py new file mode 100644 index 000000000000..a2bd0467d404 --- /dev/null +++ b/azure-security-keyvault/azure/security/keyvault/version.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +VERSION = "0.0.1" diff --git a/azure-security-keyvault/setup.py b/azure-security-keyvault/setup.py new file mode 100644 index 000000000000..d01e0e3e80b3 --- /dev/null +++ b/azure-security-keyvault/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +# pylint:disable=missing-docstring + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-security-keyvault" +PACKAGE_PPRINT_NAME = "Key Vault" + +# a-b-c => a/b/c +PACKAGE_FOLDER_PATH = PACKAGE_NAME.replace("-", "/") +# a-b-c => a.b.c +NAMESPACE_NAME = PACKAGE_NAME.replace("-", ".") + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + + try: + VER = azure.__version__ # type: ignore + raise Exception( + "This package is incompatible with azure=={}. ".format(VER) + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# 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: + README = f.read() +with open("HISTORY.md", encoding="utf-8") as f: + HISTORY = f.read() + +setup( + name=PACKAGE_NAME, + version=VERSION, + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=README + "\n\n" + HISTORY, + license="MIT License", + author="Microsoft Corporation", + author_email="azurekeyvault@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", + 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", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.security", + ] + ), + install_requires=[ + # "azure-core>=0.0.1" + ], + extras_require={":python_version<'3.0'": ["azure-security-nspkg"]}, +) diff --git a/azure-security-nspkg/README.md b/azure-security-nspkg/README.md new file mode 100644 index 000000000000..61a4455b34f5 --- /dev/null +++ b/azure-security-nspkg/README.md @@ -0,0 +1,17 @@ +# Azure Security namespace package client library for Python + +This is the Microsoft Azure Security namespace package. It provides the necessary files for other packages to extend the azure namespace. It is not intended to be installed directly. + +# Getting started + +This is a namespace package not intended to be installed directly. + +# Key concepts + +# Examples + +# Troubleshooting + +# Next steps + +# Contributing diff --git a/azure-security-nspkg/azure/__init__.py b/azure-security-nspkg/azure/__init__.py new file mode 100644 index 000000000000..53cba84ea20f --- /dev/null +++ b/azure-security-nspkg/azure/__init__.py @@ -0,0 +1,2 @@ +# pylint:disable=missing-docstring +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/azure-security-nspkg/azure/security/__init__.py b/azure-security-nspkg/azure/security/__init__.py new file mode 100644 index 000000000000..53cba84ea20f --- /dev/null +++ b/azure-security-nspkg/azure/security/__init__.py @@ -0,0 +1,2 @@ +# pylint:disable=missing-docstring +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/azure-security-nspkg/setup.py b/azure-security-nspkg/setup.py new file mode 100644 index 000000000000..5144d8ef0075 --- /dev/null +++ b/azure-security-nspkg/setup.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +# pylint:disable=missing-docstring + +from setuptools import setup + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + + try: + VER = azure.__version__ # type: ignore + raise Exception( + "This package is incompatible with azure=={}. ".format(VER) + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +setup( + name="azure-security-nspkg", + version="0.0.1", + description="Microsoft Azure Key Vault Namespace Package [Internal]", + long_description="", + license="MIT License", + author="Microsoft Corporation", + author_email="azurekeyvault@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", + 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.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=["azure.security"], + install_requires=["azure-nspkg>=2.0.0"], +) diff --git a/shared_requirements.txt b/shared_requirements.txt index 272ca040bd1b..324e1fcccbc2 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -76,6 +76,7 @@ azure-mgmt-subscription~=0.2.0 azure-mgmt-trafficmanager~=0.50.0 azure-mgmt-web~=0.35.0 azure-nspkg +azure-security-nspkg azure-servicebus~=0.21.1 azure-servicefabric~=6.3.0.0 azure-servicemanagement-legacy~=0.20.6