forked from oracle/oci-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (56 loc) · 2.16 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# coding: utf-8
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
import io
import os
import re
from setuptools import setup, find_packages
def open_relative(*path):
"""
Opens files in read-only with a fixed utf-8 encoding.
All locations are relative to this setup.py file.
"""
here = os.path.abspath(os.path.dirname(__file__))
filename = os.path.join(here, *path)
return io.open(filename, mode="r", encoding="utf-8")
with open_relative("src", "oci", "version.py") as fd:
version = re.search(
r"^__version__\s*=\s*['\"]([^'\"]*)['\"]",
fd.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError("Cannot find version information")
with open_relative("README.rst") as f:
readme = f.read()
requires = [
"certifi",
"configparser==4.0.2 ; python_version < '3'",
"cryptography>=3.2.1,<39.0.0",
"pyOpenSSL>=17.5.0,<=22.1.0",
"python-dateutil>=2.5.3,<3.0.0",
"pytz>=2016.10",
"circuitbreaker>=1.3.1,< 2.0.0"
]
setup(
name="oci",
url="https://docs.oracle.com/en-us/iaas/tools/python/latest/index.html",
version=version,
description="Oracle Cloud Infrastructure Python SDK",
long_description=readme,
author="Oracle",
author_email="joe.levy@oracle.com",
packages=find_packages(where="src"),
package_dir={"": "src"},
include_package_data=True,
install_requires=requires,
license="Universal Permissive License 1.0 or Apache License 2.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: Universal Permissive License (UPL)",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
)