1
+ from setuptools import setup , find_packages
2
+ import os
3
+ from io import open
4
+ import re
5
+
6
+ # example setup.py Feel free to copy the entire "azure-template" folder into a package folder named
7
+ # with "azure-<yourpackagename>". Ensure that the below arguments to setup() are updated to reflect
8
+ # your package.
9
+
10
+ # this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way
11
+ # up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging
12
+
13
+ PACKAGE_NAME = "azure-communication-identity"
14
+ PACKAGE_PPRINT_NAME = "Communication Identity Service"
15
+
16
+ # a-b-c => a/b/c
17
+ package_folder_path = PACKAGE_NAME .replace ('-' , '/' )
18
+ # a-b-c => a.b.c
19
+ namespace_name = PACKAGE_NAME .replace ('-' , '.' )
20
+
21
+ # Version extraction inspired from 'requests'
22
+ with open (os .path .join (package_folder_path , '_version.py' ), 'r' ) as fd :
23
+ version = re .search (r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]' ,
24
+ fd .read (), re .MULTILINE ).group (1 )
25
+ if not version :
26
+ raise RuntimeError ('Cannot find version information' )
27
+
28
+ with open ('README.md' , encoding = 'utf-8' ) as f :
29
+ long_description = f .read ()
30
+
31
+ setup (
32
+ name = PACKAGE_NAME ,
33
+ version = version ,
34
+ description = 'Microsoft Azure {} Client Library for Python' .format (PACKAGE_PPRINT_NAME ),
35
+ long_description_content_type = 'text/markdown' ,
36
+
37
+ # ensure that these are updated to reflect the package owners' information
38
+ long_description = long_description ,
39
+ url = 'https://github.com/Azure/azure-sdk-for-python' ,
40
+ author = 'Microsoft Corporation' ,
41
+
42
+
43
+ license = 'MIT License' ,
44
+ # ensure that the development status reflects the status of your package
45
+ classifiers = [
46
+ "Development Status :: 4 - Beta" ,
47
+
48
+ 'Programming Language :: Python' ,
49
+ 'Programming Language :: Python :: 2' ,
50
+ 'Programming Language :: Python :: 2.7' ,
51
+ 'Programming Language :: Python :: 3' ,
52
+ 'Programming Language :: Python :: 3.4' ,
53
+ 'Programming Language :: Python :: 3.5' ,
54
+ 'Programming Language :: Python :: 3.6' ,
55
+ 'Programming Language :: Python :: 3.7' ,
56
+ 'Programming Language :: Python :: 3.8' ,
57
+ 'License :: OSI Approved :: MIT License' ,
58
+ ],
59
+ packages = find_packages (exclude = [
60
+ 'tests' ,
61
+ # Exclude packages that will be covered by PEP420 or nspkg
62
+ 'azure' ,
63
+ 'azure.communication'
64
+ ]),
65
+ install_requires = [
66
+ "msrest>=0.6.0" ,
67
+ "azure-core<2.0.0,>=1.6.0" ,
68
+ ],
69
+ extras_require = {
70
+ ":python_version<'3.0'" : ['azure-communication-nspkg' ],
71
+ },
72
+ project_urls = {
73
+ 'Bug Reports' : 'https://github.com/Azure/azure-sdk-for-python/issues' ,
74
+ 'Source' : 'https://github.com/Azure/azure-sdk-for-python' ,
75
+ }
76
+ )
0 commit comments