forked from equinor/osdu-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
62 lines (54 loc) · 2.09 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
# -----------------------------------------------------------------------------
# Copyright (c) Equinor ASA. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
"""OSDU SDK package that can be installed using setuptools"""
# For reasons behind /src/ file structure see https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure
import os
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import setup, find_packages
def read(fname):
"""Local read helper function for long documentation"""
osdu_path = dirname(os.path.realpath(__file__))
return open(join(osdu_path, fname)).read()
version_file = read(os.path.join("src", "osdu", "__init__.py"))
__VERSION__ = re.search(
r'^__VERSION__\s*=\s*[\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE
).group(1)
setup(
name="osdu-sdk",
version=__VERSION__,
description="OSDU SDK for Python",
long_description=read("README.rst"),
url="https://github.com/equinor/osdu-sdk-python",
author="Equinor ASA",
author_email="[email protected]",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="osdu sdk python",
python_requires=">=3.8",
packages=find_packages("src"),
package_dir={"": "src"},
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
include_package_data=True,
install_requires=["requests", "msal"],
project_urls={
"Issue Tracker": "https://github.com/equinor/osdu-sdk-python/issues",
},
)