Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion scripts/devops_tasks/common_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"mgmt",
"azure-cognitiveservices",
"azure-servicefabric",
"azure-nspkg",
"nspkg"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not azure-keyvault-nspkg?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. This allows any package with "nspkg" in its name to pass CI despite having no tests.

]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-e ../../../tools/azure-devtools
-e ../../../tools/azure-sdk-tools
-e ../../identity/azure-identity
-e ../azure-keyvault-nspkg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should not be necessary for dev, since all init will contain pkgutil line, nspkg is really interesting only for Python 2 correct support

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least it won't be necessary once the azure-keyvault-nspkg package has been published to PyPi :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was necessary to unblock CI, which was failing to install the dependency (it hasn't been published).

-e ../azure-mgmt-keyvault
aiohttp>=3.0; python_version >= '3.5'
pytest-asyncio>=0.8.0; python_version > '3.4'
3 changes: 2 additions & 1 deletion sdk/keyvault/azure-keyvault-certificates/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]},
)
1 change: 1 addition & 0 deletions sdk/keyvault/azure-keyvault-keys/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-e ../../core/azure-core
-e ../../identity/azure-identity
-e ../azure-mgmt-keyvault
-e ../azure-keyvault-nspkg
-e ../../../tools/azure-sdk-tools
aiohttp>=3.0; python_version >= '3.5'
pytest-asyncio>=0.8.0; python_version > '3.4'
3 changes: 2 additions & 1 deletion sdk/keyvault/azure-keyvault-keys/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]},
)
3 changes: 3 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include *.md
include azure/__init__.py
include azure/keyvault/__init__.py
Comment thread
chlowell marked this conversation as resolved.
Outdated
17 changes: 17 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-certificates)
- [`azure-keyvault-keys`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-keys)
- [`azure-keyvault-secrets`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-secrets)

This is a Python 2 package only. Python 3.x libraries will use
[`PEP420`](https://www.python.org/dev/peps/pep-0420/) as namespace package
strategy. To avoid issues with package servers that don't support
`python_requires`, a Python 3 package is installed but is empty.

This package provides the necessary files for other packages to extend the
`azure` namespace.

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fkeyvault%2Fazure-keyvault-nspkg%2FFREADME.png)
6 changes: 6 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/azure/keyvault/__init__.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/sdk_packaging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[packaging]
auto_update = false
2 changes: 2 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1
Comment thread
lmazuel marked this conversation as resolved.
57 changes: 57 additions & 0 deletions sdk/keyvault/azure-keyvault-nspkg/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/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

PACKAGES = []
# Do an empty package on Python 3 and not python_requires, since not everybody is ready
# https://github.com/Azure/azure-sdk-for-python/issues/3447
# https://github.com/Azure/azure-sdk-for-python/issues/3481
if sys.version_info[0] < 3:
PACKAGES = ["azure.keyvault"]

setup(
name="azure-keyvault-nspkg",
version="3.0.0",
Comment thread
chlowell marked this conversation as resolved.
Outdated
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="azurekeyvault@microsoft.com",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the correct author email?

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.4",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=PACKAGES,
install_requires=["azure-nspkg>=3.0.0"],
)
1 change: 1 addition & 0 deletions sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-e ../../core/azure-core
-e ../../identity/azure-identity
-e ../azure-mgmt-keyvault
-e ../azure-keyvault-nspkg
-e ../../../tools/azure-sdk-tools
aiohttp>=3.0; python_version >= '3.5'
pytest-asyncio>=0.8.0; python_version > '3.4'
3 changes: 2 additions & 1 deletion sdk/keyvault/azure-keyvault-secrets/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]},
)
1 change: 1 addition & 0 deletions shared_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ azure-mgmt-subscription~=0.2.0
azure-mgmt-trafficmanager~=0.50.0
azure-mgmt-web~=0.35.0
azure-nspkg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to remove this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe so. azure-nspkg is for the azure namespace. I'm creating a new package for azure.keyvault.

azure-keyvault-nspkg
azure-security-nspkg
azure-servicebus~=0.21.1
azure-servicefabric~=6.3.0.0
Expand Down