Skip to content

Commit fc6860e

Browse files
committed
created correct structure heirachy for gen code
1 parent cc6786f commit fc6860e

23 files changed

+94
-8
lines changed
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore

sdk/storage/azure-storage-tables/azure/storage/tables/__init__.py

Whitespace-only changes.

sdk/storage/azure-storage-tables/generated/azure_table/aio/operations_async/_service_operations_async.py renamed to sdk/storage/azure-storage-tables/azure/storage/tables/_generated/aio/operations_async/_service_operations_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator})
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
6-
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
7-
import warnings
6+
from typing import Any, Callable, Dict, Optional, TypeVar
87

98
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
109
from azure.core.pipeline import PipelineResponse

sdk/storage/azure-storage-tables/generated/azure_table/aio/operations_async/_table_operations_async.py renamed to sdk/storage/azure-storage-tables/azure/storage/tables/_generated/aio/operations_async/_table_operations_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator})
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
6-
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union
7-
import warnings
6+
from typing import Any, Callable, Dict, List, Optional, TypeVar, Union
87

98
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
109
from azure.core.pipeline import PipelineResponse

sdk/storage/azure-storage-tables/generated/azure_table/operations/_service_operations.py renamed to sdk/storage/azure-storage-tables/azure/storage/tables/_generated/operations/_service_operations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
from typing import TYPE_CHECKING
7-
import warnings
87

98
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
109
from azure.core.pipeline import PipelineResponse
@@ -14,7 +13,7 @@
1413

1514
if TYPE_CHECKING:
1615
# pylint: disable=unused-import,ungrouped-imports
17-
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
16+
from typing import Any, Callable, Dict, Optional, TypeVar
1817

1918
T = TypeVar('T')
2019
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

sdk/storage/azure-storage-tables/generated/azure_table/operations/_table_operations.py renamed to sdk/storage/azure-storage-tables/azure/storage/tables/_generated/operations/_table_operations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
from typing import TYPE_CHECKING
7-
import warnings
87

98
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
109
from azure.core.pipeline import PipelineResponse
@@ -14,7 +13,7 @@
1413

1514
if TYPE_CHECKING:
1615
# pylint: disable=unused-import,ungrouped-imports
17-
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union
16+
from typing import Any, Callable, Dict, List, Optional, TypeVar, Union
1817

1918
T = TypeVar('T')
2019
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VERSION = "12.1.2"
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/usr/bin/env python
2+
3+
#-------------------------------------------------------------------------
4+
# Copyright (c) Microsoft Corporation. All rights reserved.
5+
# Licensed under the MIT License. See License.txt in the project root for
6+
# license information.
7+
#--------------------------------------------------------------------------
8+
9+
import re
10+
import os.path
11+
from io import open
12+
from setuptools import find_packages, setup # type: ignore
13+
14+
# Change the PACKAGE_NAME only to change folder and different name
15+
PACKAGE_NAME = "azure-storage-tables"
16+
PACKAGE_PPRINT_NAME = "Azure Table Storage"
17+
18+
# a-b-c => a/b/c
19+
package_folder_path = PACKAGE_NAME.replace('-', '/')
20+
# a-b-c => a.b.c
21+
namespace_name = PACKAGE_NAME.replace('-', '.')
22+
23+
# azure v0.x is not compatible with this package
24+
# azure v0.x used to have a __version__ attribute (newer versions don't)
25+
try:
26+
import azure
27+
try:
28+
ver = azure.__version__ # type: ignore
29+
raise Exception(
30+
'This package is incompatible with azure=={}. '.format(ver) +
31+
'Uninstall it with "pip uninstall azure".'
32+
)
33+
except AttributeError:
34+
pass
35+
except ImportError:
36+
pass
37+
38+
# Version extraction inspired from 'requests'
39+
with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd:
40+
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', # type: ignore
41+
fd.read(), re.MULTILINE).group(1)
42+
43+
if not version:
44+
raise RuntimeError('Cannot find version information')
45+
46+
setup(
47+
name=PACKAGE_NAME,
48+
version=version,
49+
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
50+
long_description='\n\n',
51+
long_description_content_type='text/markdown',
52+
license='MIT License',
53+
author='Microsoft Corporation',
54+
author_email='[email protected]',
55+
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-queue',
56+
classifiers=[
57+
"Development Status :: 5 - Production/Stable",
58+
'Programming Language :: Python',
59+
'Programming Language :: Python :: 2',
60+
'Programming Language :: Python :: 2.7',
61+
'Programming Language :: Python :: 3',
62+
'Programming Language :: Python :: 3.5',
63+
'Programming Language :: Python :: 3.6',
64+
'Programming Language :: Python :: 3.7',
65+
'Programming Language :: Python :: 3.8',
66+
'License :: OSI Approved :: MIT License',
67+
],
68+
zip_safe=False,
69+
packages=find_packages(exclude=[
70+
# Exclude packages that will be covered by PEP420 or nspkg
71+
'azure',
72+
'azure.storage',
73+
'tests',
74+
'tests.queue',
75+
'tests.common'
76+
]),
77+
install_requires=[
78+
"azure-core<2.0.0,>=1.2.2",
79+
"msrest>=0.6.10",
80+
"cryptography>=2.1.4"
81+
],
82+
extras_require={
83+
":python_version<'3.0'": ['futures', 'azure-storage-nspkg<4.0.0,>=3.0.0'],
84+
":python_version<'3.4'": ['enum34>=1.0.4'],
85+
":python_version<'3.5'": ["typing"]
86+
},
87+
)

0 commit comments

Comments
 (0)