Skip to content

Commit 44e09c3

Browse files
authored
azure nspkg 3.0 (#3412)
* Main azure nspkg 3.0 * Adapt dev_setup to new nspkg * New nspkg system * Auto-update parameter for toml * Common with new packaging style * Kill install old nspkg * Ignore packaging for bundle package * Don't auto-update Cognitive Services nspkg * azure-nspkg no auto-update * Cognitive Services new packaging * Dataplane new packaging * Never auto-update the nspkg * All packages which didn't have toml file * Manual pkgutil for not auto-update * Batch commit all package with already a toml * azure-nspkg 3.0.0 and dev_setup for easy backward compat * Python ignore requires on Py3 * Ignore required for all packages * Uninstall azure-nspkg * Install nspkg in wheel mode, not editable * Improve gitignore * Cognitive Services new nspkg * Improve azure-mgmt-nspkg
1 parent bf3478b commit 44e09c3

File tree

689 files changed

+1701
-6183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

689 files changed

+1701
-6183
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
__pycache__/
33
*.pyc
44
.pytest_cache
5+
.mypy_cache
6+
.cache
57

68
# Virtual environment
79
env*/
@@ -26,7 +28,7 @@ build/
2628
# Test results
2729
TestResults/
2830

29-
# Credentials
31+
# Credentials
3032
credentials_real.json
3133
testsettings_local.json
3234
testsettings_local.cfg

azure-applicationinsights/MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
include *.rst
2-
include azure_bdist_wheel.py

azure-applicationinsights/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure Application Insights Client Library.
66
Azure Resource Manager (ARM) is the next generation of management APIs that
77
replace the old Azure Service Management (ASM).
88

9-
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
9+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
1010

1111
For the older Azure Service Management (ASM) libraries, see
1212
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

azure-applicationinsights/azure_bdist_wheel.py

-54
This file was deleted.

azure-applicationinsights/setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[bdist_wheel]
22
universal=1
3-
azure-namespace-package=azure-nspkg

azure-applicationinsights/setup.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
import os.path
1111
from io import open
1212
from setuptools import find_packages, setup
13-
try:
14-
from azure_bdist_wheel import cmdclass
15-
except ImportError:
16-
from distutils import log as logger
17-
logger.warn("Wheel is not available, disabling bdist_wheel hook")
18-
cmdclass = {}
1913

2014
# Change the PACKAGE_NAME only to change folder and different name
2115
PACKAGE_NAME = "azure-applicationinsights"
@@ -76,10 +70,16 @@
7670
'License :: OSI Approved :: MIT License',
7771
],
7872
zip_safe=False,
79-
packages=find_packages(exclude=["tests"]),
73+
packages=find_packages(exclude=[
74+
'tests',
75+
# Exclude packages that will be covered by PEP420 or nspkg
76+
'azure',
77+
]),
8078
install_requires=[
81-
'msrest>=0.5.4,<2.0.0',
79+
'msrest>=0.5.0',
8280
'azure-common~=1.1',
8381
],
84-
cmdclass=cmdclass
82+
extras_require={
83+
":python_version<'3.0'": ['azure-nspkg'],
84+
}
8585
)

azure-batch/azure/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
include *.rst
2-
include azure_bdist_wheel.py
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

azure-cognitiveservices-language-luis/azure_bdist_wheel.py

-54
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[bdist_wheel]
22
universal=1
3-
azure-namespace-package=azure-cognitiveservices-language-nspkg

azure-cognitiveservices-language-luis/setup.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
import os.path
1111
from io import open
1212
from setuptools import find_packages, setup
13-
try:
14-
from azure_bdist_wheel import cmdclass
15-
except ImportError:
16-
from distutils import log as logger
17-
logger.warn("Wheel is not available, disabling bdist_wheel hook")
18-
cmdclass = {}
1913

2014
# Change the PACKAGE_NAME only to change folder and different name
2115
PACKAGE_NAME = "azure-cognitiveservices-language-luis"
@@ -76,10 +70,18 @@
7670
'License :: OSI Approved :: MIT License',
7771
],
7872
zip_safe=False,
79-
packages=find_packages(exclude=["tests"]),
73+
packages=find_packages(exclude=[
74+
'tests',
75+
# Exclude packages that will be covered by PEP420 or nspkg
76+
'azure',
77+
'azure.cognitiveservices',
78+
'azure.cognitiveservices.language',
79+
]),
8080
install_requires=[
8181
'msrest>=0.5.0',
8282
'azure-common~=1.1',
8383
],
84-
cmdclass=cmdclass
84+
extras_require={
85+
":python_version<'3.0'": ['azure-cognitiveservices-language-nspkg'],
86+
}
8587
)

azure-cognitiveservices-language-nspkg/README.rst

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This is the Microsoft Azure Cognitive Services Language namespace package.
55

66
This package is not intended to be installed directly by the end user.
77

8+
Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 <https://www.python.org/dev/peps/pep-0420/>` as namespace package strategy.
9+
This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0.
10+
811
It provides the necessary files for other packages to extend the azure.cognitiveservices.language namespace.
912

1013
If you are looking to install the Azure client libraries, see the
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[packaging]
2+
auto_update = false

azure-cognitiveservices-language-nspkg/setup.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
setup(
2727
name='azure-cognitiveservices-language-nspkg',
28-
version='2.0.0',
28+
version='3.0.0',
2929
description='Microsoft Azure Cognitive Services Language Namespace Package [Internal]',
3030
long_description=open('README.rst', 'r').read(),
3131
license='MIT License',
@@ -37,19 +37,14 @@
3737
'Programming Language :: Python',
3838
'Programming Language :: Python :: 2',
3939
'Programming Language :: Python :: 2.7',
40-
'Programming Language :: Python :: 3',
41-
'Programming Language :: Python :: 3.4',
42-
'Programming Language :: Python :: 3.5',
43-
'Programming Language :: Python :: 3.6',
4440
'License :: OSI Approved :: MIT License',
4541
],
4642
zip_safe=False,
4743
packages=[
48-
'azure',
49-
'azure.cognitiveservices',
5044
'azure.cognitiveservices.language',
5145
],
46+
python_requires='<3',
5247
install_requires=[
53-
'azure-cognitiveservices-nspkg>=2.0.0',
48+
'azure-cognitiveservices-nspkg>=3.0.0',
5449
]
5550
)
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
include *.rst
2-
include azure_bdist_wheel.py

azure-cognitiveservices-language-spellcheck/README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Microsoft Azure SDK for Python
22
==============================
33

4-
This is the Microsoft Azure Cognitive Services Bing Spell Check Client Library.
4+
This is the Microsoft Azure Cognitive Services Spellcheck Client Library.
55

6-
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
6+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
77

88
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
99

@@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
3030
Usage
3131
=====
3232

33-
For code examples, see `Spell Check
33+
For code examples, see `Cognitive Services Spellcheck
3434
<https://docs.microsoft.com/python/api/overview/azure/cognitive-services>`__
35-
on readthedocs.org.
35+
on docs.microsoft.com.
3636

3737

3838
Provide Feedback
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

azure-cognitiveservices-language-spellcheck/azure_bdist_wheel.py

-54
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[packaging]
2+
package_name = "azure-cognitiveservices-language-spellcheck"
3+
package_nspkg = "azure-cognitiveservices-language-nspkg"
4+
package_pprint_name = "Cognitive Services Spellcheck"
5+
package_doc_id = "cognitive-services"
6+
is_stable = true
7+
is_arm = false

0 commit comments

Comments
 (0)