diff --git a/.docsettings.yml b/.docsettings.yml index 64fd4c1b13c8..f964848ba625 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -63,11 +63,12 @@ known_content_issues: - ['sdk/core/azure-mgmt-nspkg/README.rst', 'nspkg and common'] - ['sdk/core/azure-core/README.md', 'nspkg and common'] - ['sdk/appconfiguration/azure-appconfiguration/README.md', 'nspkg and common'] + - ['sdk/keyvault/azure-keyvault-nspkg/README.md', 'nspkg and common'] # root readme - ['README.md', 'root readme'] - # dev tools + # dev tools - ['doc/dev/mgmt/swagger/single_api/readme.md', 'dev readme'] - ['doc/dev/mgmt/swagger/multi_api/readme.md', 'dev readme'] - ['doc/dev/mgmt/README.md', 'dev readme'] diff --git a/scripts/devops_tasks/common_tasks.py b/scripts/devops_tasks/common_tasks.py index cd0ba81c73e6..45e7b1a1e4cf 100644 --- a/scripts/devops_tasks/common_tasks.py +++ b/scripts/devops_tasks/common_tasks.py @@ -25,7 +25,7 @@ "mgmt", "azure-cognitiveservices", "azure-servicefabric", - "azure-nspkg", + "nspkg" ] diff --git a/sdk/keyvault/azure-keyvault-certificates/MANIFEST.in b/sdk/keyvault/azure-keyvault-certificates/MANIFEST.in index 7872cdc8cbae..dd6fc3a9136c 100644 --- a/sdk/keyvault/azure-keyvault-certificates/MANIFEST.in +++ b/sdk/keyvault/azure-keyvault-certificates/MANIFEST.in @@ -1,6 +1,3 @@ include *.md include azure/__init__.py include azure/keyvault/__init__.py -include azure/keyvault/certificates/__init__.py -include azure/keyvault/certificates/_generated/__init__.py -include azure/keyvault/certificates/aio/__init__.py diff --git a/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt b/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt index e4a2fc1ce4b2..9d0003f90fcb 100644 --- a/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt @@ -3,5 +3,6 @@ -e ../../../tools/azure-sdk-tools -e ../../identity/azure-identity -e ../azure-mgmt-keyvault +../azure-keyvault-nspkg aiohttp>=3.0; python_version >= '3.5' pytest-asyncio>=0.8.0; python_version > '3.4' diff --git a/sdk/keyvault/azure-keyvault-certificates/setup.py b/sdk/keyvault/azure-keyvault-certificates/setup.py index fdec6b0617d0..3e9a42092f47 100644 --- a/sdk/keyvault/azure-keyvault-certificates/setup.py +++ b/sdk/keyvault/azure-keyvault-certificates/setup.py @@ -75,8 +75,9 @@ "tests", # Exclude packages that will be covered by PEP420 or nspkg "azure", + "azure.keyvault" ] ), install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"], - extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, + extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]}, ) diff --git a/sdk/keyvault/azure-keyvault-keys/MANIFEST.in b/sdk/keyvault/azure-keyvault-keys/MANIFEST.in index fc1bddf95587..dd6fc3a9136c 100644 --- a/sdk/keyvault/azure-keyvault-keys/MANIFEST.in +++ b/sdk/keyvault/azure-keyvault-keys/MANIFEST.in @@ -1,6 +1,3 @@ include *.md include azure/__init__.py include azure/keyvault/__init__.py -include azure/keyvault/keys/__init__.py -include azure/keyvault/keys/_generated/__init__.py -include azure/keyvault/keys/aio/__init__.py diff --git a/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt b/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt index a948557b6300..140a9942dc1c 100644 --- a/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt @@ -3,5 +3,6 @@ -e ../../identity/azure-identity -e ../azure-mgmt-keyvault -e ../../../tools/azure-sdk-tools +../azure-keyvault-nspkg aiohttp>=3.0; python_version >= '3.5' pytest-asyncio>=0.8.0; python_version > '3.4' diff --git a/sdk/keyvault/azure-keyvault-keys/setup.py b/sdk/keyvault/azure-keyvault-keys/setup.py index 81c1c48b384d..aa22ea762ed9 100644 --- a/sdk/keyvault/azure-keyvault-keys/setup.py +++ b/sdk/keyvault/azure-keyvault-keys/setup.py @@ -75,8 +75,9 @@ "tests", # Exclude packages that will be covered by PEP420 or nspkg "azure", + "azure.keyvault", ] ), install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"], - extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, + extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]}, ) diff --git a/sdk/keyvault/azure-keyvault-nspkg/MANIFEST.in b/sdk/keyvault/azure-keyvault-nspkg/MANIFEST.in new file mode 100644 index 000000000000..50c61fef797b --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/MANIFEST.in @@ -0,0 +1,2 @@ +include *.md +include azure/__init__.py \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-nspkg/README.md b/sdk/keyvault/azure-keyvault-nspkg/README.md new file mode 100644 index 000000000000..51c83fe9d331 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/README.md @@ -0,0 +1,13 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Key Vault namespace package. It isn't intended to +be installed directly. Key Vault client libraries are located elsewhere: +- [`azure-keyvault-certificates`](https://pypi.org/project/azure-keyvault-certificates) +- [`azure-keyvault-keys`](https://pypi.org/project/azure-keyvault-keys/) +- [`azure-keyvault-secrets`](https://pypi.org/project/azure-keyvault-secrets) + +This package is for Python 2 only. It provides the necessary files for other +packages to extend the `azure` namespace. Python 3.x libraries use +[`PEP420`](https://www.python.org/dev/peps/pep-0420/) instead. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fkeyvault%2Fazure-keyvault-nspkg%2FFREADME.png) diff --git a/sdk/keyvault/azure-keyvault-nspkg/azure/__init__.py b/sdk/keyvault/azure-keyvault-nspkg/azure/__init__.py new file mode 100644 index 000000000000..125860bac907 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/azure/__init__.py @@ -0,0 +1,6 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +# pylint:disable=missing-docstring +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/keyvault/azure-keyvault-nspkg/azure/keyvault/__init__.py b/sdk/keyvault/azure-keyvault-nspkg/azure/keyvault/__init__.py new file mode 100644 index 000000000000..125860bac907 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/azure/keyvault/__init__.py @@ -0,0 +1,6 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +# pylint:disable=missing-docstring +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/keyvault/azure-keyvault-nspkg/sdk_packaging.toml b/sdk/keyvault/azure-keyvault-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-nspkg/setup.cfg b/sdk/keyvault/azure-keyvault-nspkg/setup.cfg new file mode 100644 index 000000000000..3480374bc2f2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-nspkg/setup.py b/sdk/keyvault/azure-keyvault-nspkg/setup.py new file mode 100644 index 000000000000..deb5bb3d91a2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-nspkg/setup.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import sys +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__ + 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-keyvault-nspkg", + version="1.0.0", + description="Microsoft Azure Key Vault Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault", + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "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.keyvault"], + install_requires=["azure-nspkg>=3.0.0"], +) diff --git a/sdk/keyvault/azure-keyvault-secrets/MANIFEST.in b/sdk/keyvault/azure-keyvault-secrets/MANIFEST.in index ad2fd973aa15..dd6fc3a9136c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/MANIFEST.in +++ b/sdk/keyvault/azure-keyvault-secrets/MANIFEST.in @@ -1,6 +1,3 @@ include *.md include azure/__init__.py include azure/keyvault/__init__.py -include azure/keyvault/secrets/__init__.py -include azure/keyvault/secrets/_generated/__init__.py -include azure/keyvault/secrets/aio/__init__.py diff --git a/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt b/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt index a8fdc44bf477..d0527f7c347a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt @@ -3,5 +3,6 @@ -e ../../identity/azure-identity -e ../azure-mgmt-keyvault -e ../../../tools/azure-sdk-tools +../azure-keyvault-nspkg aiohttp>=3.0; python_version >= '3.5' pytest-asyncio>=0.8.0; python_version > '3.4' \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-secrets/setup.py b/sdk/keyvault/azure-keyvault-secrets/setup.py index c335ac87825a..4d5c98936576 100644 --- a/sdk/keyvault/azure-keyvault-secrets/setup.py +++ b/sdk/keyvault/azure-keyvault-secrets/setup.py @@ -75,8 +75,9 @@ "tests", # Exclude packages that will be covered by PEP420 or nspkg "azure", + "azure.keyvault", ] ), install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"], - extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, + extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]}, ) diff --git a/shared_requirements.txt b/shared_requirements.txt index c03066fba99e..d3b89236fe18 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -77,6 +77,7 @@ azure-mgmt-subscription~=0.2.0 azure-mgmt-trafficmanager~=0.50.0 azure-mgmt-web~=0.35.0 azure-nspkg +azure-keyvault-nspkg azure-security-nspkg azure-servicebus~=0.21.1 azure-servicefabric~=6.3.0.0