Skip to content

Commit a1a242b

Browse files
authored
Fix azure-cognitiveservices-nspkg (and sub nspkg) (#4467)
* Fix azure-cognitiveservices-nspkg * Fix azure-cognitiveservices-language-nspkg * Fix indentation in Readme * Fix azure-cognitiveservices-search-nspkg * Fix azure-cognitiveservices-vision-nspkg * Add missing import sys
1 parent 95e618e commit a1a242b

File tree

17 files changed

+72
-36
lines changed

17 files changed

+72
-36
lines changed

azure-cognitiveservices-knowledge-nspkg/README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ This is the Microsoft Azure Cognitive Services Knowledge 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. To avoid issues with package servers that does not support python_requires, a Python 3 package is installed but is empty.
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+
To avoid issues with package servers that does not support python_requires, a Python 3 package is installed but is empty.
910

1011
It provides the necessary files for other packages to extend the azure.cognitiveservices.knowledge namespace.
1112

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
include *.rst
2+
include azure/cognitiveservices/__init__.py
3+
include azure/cognitiveservices/language/__init__.py

azure-cognitiveservices-language-nspkg/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services Language namespace package.
66
This package is not intended to be installed directly by the end user.
77

88
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.
9+
To avoid issues with package servers that does not support `python_requires`, a Python 3 package is installed but is empty.
1010

1111
It provides the necessary files for other packages to extend the azure.cognitiveservices.language namespace.
1212

azure-cognitiveservices-language-nspkg/setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

azure-cognitiveservices-language-nspkg/setup.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
#--------------------------------------------------------------------------
8-
8+
import sys
99
from setuptools import setup
1010

1111
# azure v0.x is not compatible with this package
@@ -23,9 +23,16 @@
2323
except ImportError:
2424
pass
2525

26+
PACKAGES = []
27+
# Do an empty package on Python 3 and not python_requires, since not everybody is ready
28+
# https://github.com/Azure/azure-sdk-for-python/issues/3447
29+
# https://github.com/Azure/azure-sdk-for-python/issues/3481
30+
if sys.version_info[0] < 3:
31+
PACKAGES = ['azure.cognitiveservices.language']
32+
2633
setup(
2734
name='azure-cognitiveservices-language-nspkg',
28-
version='3.0.0',
35+
version='3.0.1',
2936
description='Microsoft Azure Cognitive Services Language Namespace Package [Internal]',
3037
long_description=open('README.rst', 'r').read(),
3138
license='MIT License',
@@ -37,13 +44,15 @@
3744
'Programming Language :: Python',
3845
'Programming Language :: Python :: 2',
3946
'Programming Language :: Python :: 2.7',
47+
'Programming Language :: Python :: 3',
48+
'Programming Language :: Python :: 3.4',
49+
'Programming Language :: Python :: 3.5',
50+
'Programming Language :: Python :: 3.6',
51+
'Programming Language :: Python :: 3.7',
4052
'License :: OSI Approved :: MIT License',
4153
],
4254
zip_safe=False,
43-
packages=[
44-
'azure.cognitiveservices.language',
45-
],
46-
python_requires='<3',
55+
packages=PACKAGES,
4756
install_requires=[
4857
'azure-cognitiveservices-nspkg>=3.0.0',
4958
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
include *.rst
2+
include azure/cognitiveservices/__init__.py

azure-cognitiveservices-nspkg/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services namespace package.
66
This package is not intended to be installed directly by the end user.
77

88
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.
9+
To avoid issues with package servers that does not support `python_requires`, a Python 3 package is installed but is empty.
1010

1111
It provides the necessary files for other packages to extend the azure.cognitiveservices namespace.
1212

azure-cognitiveservices-nspkg/setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

azure-cognitiveservices-nspkg/setup.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
#--------------------------------------------------------------------------
8-
8+
import sys
99
from setuptools import setup
1010

1111
# azure v0.x is not compatible with this package
@@ -23,9 +23,16 @@
2323
except ImportError:
2424
pass
2525

26+
PACKAGES = []
27+
# Do an empty package on Python 3 and not python_requires, since not everybody is ready
28+
# https://github.com/Azure/azure-sdk-for-python/issues/3447
29+
# https://github.com/Azure/azure-sdk-for-python/issues/3481
30+
if sys.version_info[0] < 3:
31+
PACKAGES = ['azure.cognitiveservices']
32+
2633
setup(
2734
name='azure-cognitiveservices-nspkg',
28-
version='3.0.0',
35+
version='3.0.1',
2936
description='Microsoft Azure Cognitive Services Namespace Package [Internal]',
3037
long_description=open('README.rst', 'r').read(),
3138
license='MIT License',
@@ -37,13 +44,15 @@
3744
'Programming Language :: Python',
3845
'Programming Language :: Python :: 2',
3946
'Programming Language :: Python :: 2.7',
47+
'Programming Language :: Python :: 3',
48+
'Programming Language :: Python :: 3.4',
49+
'Programming Language :: Python :: 3.5',
50+
'Programming Language :: Python :: 3.6',
51+
'Programming Language :: Python :: 3.7',
4052
'License :: OSI Approved :: MIT License',
4153
],
4254
zip_safe=False,
43-
packages=[
44-
'azure.cognitiveservices',
45-
],
46-
python_requires='<3',
55+
packages=PACKAGES,
4756
install_requires=[
4857
'azure-nspkg>=3.0.0',
4958
]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
include *.rst
2+
include azure/cognitiveservices/__init__.py
3+
include azure/cognitiveservices/search/__init__.py

azure-cognitiveservices-search-nspkg/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services Search namespace package.
66
This package is not intended to be installed directly by the end user.
77

88
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.
9+
To avoid issues with package servers that does not support `python_requires`, a Python 3 package is installed but is empty.
1010

1111
It provides the necessary files for other packages to extend the azure.cognitiveservices.search namespace.
1212

azure-cognitiveservices-search-nspkg/setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

azure-cognitiveservices-search-nspkg/setup.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
#--------------------------------------------------------------------------
8-
8+
import sys
99
from setuptools import setup
1010

1111
# azure v0.x is not compatible with this package
@@ -23,9 +23,16 @@
2323
except ImportError:
2424
pass
2525

26+
PACKAGES = []
27+
# Do an empty package on Python 3 and not python_requires, since not everybody is ready
28+
# https://github.com/Azure/azure-sdk-for-python/issues/3447
29+
# https://github.com/Azure/azure-sdk-for-python/issues/3481
30+
if sys.version_info[0] < 3:
31+
PACKAGES = ['azure.cognitiveservices.search']
32+
2633
setup(
2734
name='azure-cognitiveservices-search-nspkg',
28-
version='3.0.0',
35+
version='3.0.1',
2936
description='Microsoft Azure Cognitive Services Search Namespace Package [Internal]',
3037
long_description=open('README.rst', 'r').read(),
3138
license='MIT License',
@@ -37,13 +44,15 @@
3744
'Programming Language :: Python',
3845
'Programming Language :: Python :: 2',
3946
'Programming Language :: Python :: 2.7',
47+
'Programming Language :: Python :: 3',
48+
'Programming Language :: Python :: 3.4',
49+
'Programming Language :: Python :: 3.5',
50+
'Programming Language :: Python :: 3.6',
51+
'Programming Language :: Python :: 3.7',
4052
'License :: OSI Approved :: MIT License',
4153
],
4254
zip_safe=False,
43-
packages=[
44-
'azure.cognitiveservices.search',
45-
],
46-
python_requires='<3',
55+
packages=PACKAGES,
4756
install_requires=[
4857
'azure-cognitiveservices-nspkg>=3.0.0',
4958
]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
include *.rst
2+
include azure/cognitiveservices/__init__.py
3+
include azure/cognitiveservices/vision/__init__.py

azure-cognitiveservices-vision-nspkg/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services Vision namespace package.
66
This package is not intended to be installed directly by the end user.
77

88
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.
9+
To avoid issues with package servers that does not support `python_requires`, a Python 3 package is installed but is empty.
1010

1111
It provides the necessary files for other packages to extend the azure.cognitiveservices.vision namespace.
1212

azure-cognitiveservices-vision-nspkg/setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

azure-cognitiveservices-vision-nspkg/setup.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
#--------------------------------------------------------------------------
8-
8+
import sys
99
from setuptools import setup
1010

1111
# azure v0.x is not compatible with this package
@@ -23,6 +23,13 @@
2323
except ImportError:
2424
pass
2525

26+
PACKAGES = []
27+
# Do an empty package on Python 3 and not python_requires, since not everybody is ready
28+
# https://github.com/Azure/azure-sdk-for-python/issues/3447
29+
# https://github.com/Azure/azure-sdk-for-python/issues/3481
30+
if sys.version_info[0] < 3:
31+
PACKAGES = ['azure.cognitiveservices.vision']
32+
2633
setup(
2734
name='azure-cognitiveservices-vision-nspkg',
2835
version='3.0.0',
@@ -37,13 +44,15 @@
3744
'Programming Language :: Python',
3845
'Programming Language :: Python :: 2',
3946
'Programming Language :: Python :: 2.7',
47+
'Programming Language :: Python :: 3',
48+
'Programming Language :: Python :: 3.4',
49+
'Programming Language :: Python :: 3.5',
50+
'Programming Language :: Python :: 3.6',
51+
'Programming Language :: Python :: 3.7',
4052
'License :: OSI Approved :: MIT License',
4153
],
4254
zip_safe=False,
43-
packages=[
44-
'azure.cognitiveservices.vision',
45-
],
46-
python_requires='<3',
55+
packages=PACKAGES,
4756
install_requires=[
4857
'azure-cognitiveservices-nspkg>=3.0.0',
4958
]

0 commit comments

Comments
 (0)