|
1 |
| -#!/usr/bin/env python |
2 |
| -#------------------------------------------------------------------------------ |
3 |
| -# |
4 |
| -# Copyright (c) Microsoft Corporation. |
5 |
| -# All rights reserved. |
6 |
| -# |
7 |
| -# This code is licensed under the MIT License. |
8 |
| -# |
9 |
| -# Permission is hereby granted, free of charge, to any person obtaining a copy |
10 |
| -# of this software and associated documentation files(the "Software"), to deal |
11 |
| -# in the Software without restriction, including without limitation the rights |
12 |
| -# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell |
13 |
| -# copies of the Software, and to permit persons to whom the Software is |
14 |
| -# furnished to do so, subject to the following conditions : |
15 |
| -# |
16 |
| -# The above copyright notice and this permission notice shall be included in |
17 |
| -# all copies or substantial portions of the Software. |
18 |
| -# |
19 |
| -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
20 |
| -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
21 |
| -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE |
22 |
| -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
23 |
| -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
24 |
| -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
25 |
| -# THE SOFTWARE. |
26 |
| -# |
27 |
| -#------------------------------------------------------------------------------ |
28 |
| - |
29 |
| -from setuptools import setup, find_packages |
30 |
| -import re, io |
31 |
| - |
32 |
| -# setup.py shall not import main package |
33 |
| -__version__ = re.search( |
34 |
| - r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too |
35 |
| - io.open('msal/application.py', encoding='utf_8_sig').read() |
36 |
| - ).group(1) |
37 |
| - |
38 |
| -long_description = open('README.md').read() |
39 |
| - |
40 |
| -setup( |
41 |
| - name='msal', |
42 |
| - version=__version__, |
43 |
| - description=' '.join( |
44 |
| - """The Microsoft Authentication Library (MSAL) for Python library |
45 |
| - enables your app to access the Microsoft Cloud |
46 |
| - by supporting authentication of users with |
47 |
| - Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) |
48 |
| - using industry standard OAuth2 and OpenID Connect.""".split()), |
49 |
| - long_description=long_description, |
50 |
| - long_description_content_type="text/markdown", |
51 |
| - license='MIT', |
52 |
| - author='Microsoft Corporation', |
53 |
| - author_email='nugetaad@microsoft.com', |
54 |
| - url='https://github.com/AzureAD/microsoft-authentication-library-for-python', |
55 |
| - classifiers=[ |
56 |
| - 'Development Status :: 5 - Production/Stable', |
57 |
| - 'Programming Language :: Python', |
58 |
| - 'Programming Language :: Python :: 2', |
59 |
| - 'Programming Language :: Python :: 2.7', |
60 |
| - 'Programming Language :: Python :: 3', |
61 |
| - 'Programming Language :: Python :: 3.5', |
62 |
| - 'Programming Language :: Python :: 3.6', |
63 |
| - 'Programming Language :: Python :: 3.7', |
64 |
| - 'Programming Language :: Python :: 3.8', |
65 |
| - 'Programming Language :: Python :: 3.9', |
66 |
| - 'Programming Language :: Python :: 3.10', |
67 |
| - 'Programming Language :: Python :: 3.11', |
68 |
| - 'License :: OSI Approved :: MIT License', |
69 |
| - 'Operating System :: OS Independent', |
70 |
| - ], |
71 |
| - packages=find_packages(exclude=["tests"]), |
72 |
| - package_data={'': ['LICENSE']}, # Do not use data_files=[...], |
73 |
| - # which would cause the LICENSE being copied to /usr/local, |
74 |
| - # and tend to fail because of insufficient permission. |
75 |
| - # See https://stackoverflow.com/a/14211600/728675 for more detail |
76 |
| - install_requires=[ |
77 |
| - 'requests>=2.0.0,<3', |
78 |
| - 'PyJWT[crypto]>=1.0.0,<3', # MSAL does not use jwt.decode(), therefore is insusceptible to CVE-2022-29217 so no need to bump to PyJWT 2.4+ |
79 |
| - |
80 |
| - 'cryptography>=0.6,<44', |
81 |
| - # load_pem_private_key() is available since 0.6 |
82 |
| - # https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst#06---2014-09-29 |
83 |
| - # |
84 |
| - # And we will use the cryptography (X+3).0.0 as the upper bound, |
85 |
| - # based on their latest deprecation policy |
86 |
| - # https://cryptography.io/en/latest/api-stability/#deprecation |
87 |
| - |
88 |
| - "mock;python_version<'3.3'", |
89 |
| - ], |
90 |
| - extras_require={ # It does not seem to work if being defined inside setup.cfg |
91 |
| - "broker": [ |
92 |
| - # The broker is defined as optional dependency, |
93 |
| - # so that downstream apps can opt in. The opt-in is needed, partially because |
94 |
| - # most existing MSAL Python apps do not have the redirect_uri needed by broker. |
95 |
| - # MSAL Python uses a subset of API from PyMsalRuntime 0.11.2+, |
96 |
| - # but we still bump the lower bound to 0.13.2+ for its important bugfix (https://github.com/AzureAD/microsoft-authentication-library-for-cpp/pull/3244) |
97 |
| - "pymsalruntime>=0.13.2,<0.14;python_version>='3.6' and platform_system=='Windows'", |
98 |
| - ], |
99 |
| - }, |
100 |
| -) |
| 1 | +from setuptools import setup |
| 2 | +setup() |
101 | 3 |
|
0 commit comments