Skip to content

Commit ed2eb26

Browse files
authored
Packaging (#5672)
* clean up the version and package name * update setup.py * update history and set is_arm to false
1 parent a151fd3 commit ed2eb26

File tree

7 files changed

+16
-30
lines changed

7 files changed

+16
-30
lines changed

sdk/core/azure-core/HISTORY.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11

2-
v0.0.1 (unreleased)
2+
# Release History
3+
34
-------------------
45

5-
- New pipeline
6+
2019-06-07 Version 0.0.1
7+
8+
- Preview release

sdk/core/azure-core/azure/core/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#
2525
# --------------------------------------------------------------------------
2626

27-
__version__ = "0.0.1"
27+
from .version import VERSION
28+
__version__ = VERSION
2829

2930
from .configuration import Configuration
3031
from .pipeline_client import PipelineClient

sdk/core/azure-core/azure/core/pipeline/transport/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def set_xml_body(self, data):
179179

180180
def set_json_body(self, data):
181181
"""Set a JSON-friendly object as the body of the request.
182-
182+
183183
:param data: The request field data.
184184
"""
185185
if data is None:
@@ -207,7 +207,7 @@ def set_formdata_body(self, data=None):
207207

208208
def set_bytes_body(self, data):
209209
"""Set generic bytes as the body of the request.
210-
210+
211211
:param data: The request field data.
212212
"""
213213
if data:

sdk/core/azure-core/azure/core/pipeline_client.py

-1
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,3 @@ def _build_pipeline(self, config, transport): # pylint: disable=no-self-use
102102
transport,
103103
policies
104104
)
105-

sdk/core/azure-core/azure/core/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "1.0.0"
12+
VERSION = "0.0.1"
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[packaging]
22
package_name = "azure-core"
33
package_nspkg = "azure-nspkg"
4-
package_pprint_name = "MyService Management"
4+
package_pprint_name = "Core"
55
package_doc_id = ""
66
is_stable = false
7-
is_arm = true
8-
need_msrestazure = true
7+
is_arm = false
8+
need_msrestazure = false
99
auto_update = false

sdk/core/azure-core/setup.py

+3-20
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,13 @@
1313

1414
# Change the PACKAGE_NAME only to change folder and different name
1515
PACKAGE_NAME = "azure-core"
16-
PACKAGE_PPRINT_NAME = "MyService Management"
16+
PACKAGE_PPRINT_NAME = "Core"
1717

1818
# a-b-c => a/b/c
1919
package_folder_path = PACKAGE_NAME.replace('-', '/')
2020
# a-b-c => a.b.c
2121
namespace_name = PACKAGE_NAME.replace('-', '.')
2222

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-
3823
# Version extraction inspired from 'requests'
3924
with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
4025
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', # type: ignore
@@ -51,7 +36,7 @@
5136
setup(
5237
name=PACKAGE_NAME,
5338
version=version,
54-
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
39+
description='Microsoft Azure {} Library for Python'.format(PACKAGE_PPRINT_NAME),
5540
long_description=readme + '\n\n' + history,
5641
long_description_content_type='text/markdown',
5742
license='MIT License',
@@ -77,9 +62,7 @@
7762
'azure',
7863
]),
7964
install_requires=[
80-
'msrest>=0.5.0',
81-
'msrestazure>=0.4.32,<2.0.0',
82-
'azure-common~=1.1',
65+
'requests>=2.18.4',
8366
],
8467
extras_require={
8568
":python_version<'3.0'": ['azure-nspkg'],

0 commit comments

Comments
 (0)