-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup.py
70 lines (59 loc) · 1.96 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
66
67
68
69
70
from setuptools import setup, find_packages
import os
import re
requires = [
'reactivex >= 4.0.4',
'certifi >= 14.05.14',
'python_dateutil >= 2.5.3',
'setuptools >= 21.0.0',
'urllib3 >= 1.26.0',
'pyarrow >= 8.0.0'
]
with open("./README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
def get_version_from_github_ref():
github_ref = os.environ.get("GITHUB_REF")
if not github_ref:
return None
match = re.match(r"refs/tags/v(\d+\.\d+\.\d+)", github_ref)
if not match:
return None
return match.group(1)
def get_version():
# If running in GitHub Actions, get version from GITHUB_REF
version = get_version_from_github_ref()
if version:
return version
# Fallback to a default version if not in GitHub Actions
return "v0.0.0"
setup(
name='influxdb3-python',
version=get_version(),
description='Community Python client for InfluxDB 3.0',
long_description=long_description,
long_description_content_type="text/markdown",
author='InfluxData',
author_email='[email protected]',
url='https://github.com/InfluxCommunity/influxdb3-python',
packages=find_packages(exclude=['tests', 'tests.*', 'examples', 'examples.*']),
package_data={'influxdb_client_3': ['py.typed']},
extras_require={
'pandas': ['pandas'],
'polars': ['polars'],
'dataframe': ['pandas', 'polars'],
'test': ['pytest', 'pytest-cov']
},
install_requires=requires,
python_requires='>=3.8',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
)