-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
59 lines (54 loc) · 1.95 KB
/
Copy pathsetup.py
File metadata and controls
59 lines (54 loc) · 1.95 KB
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
import os
from setuptools import setup, find_packages, Command
from datetime import datetime
from pathlib import Path
#
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text(encoding="utf-8")
date_suffix = datetime.now().strftime("%y%m%d%H%M")
major_version = 0
minor_version = 0
patch_version = 0
base_version = f"{major_version}.{minor_version}.{patch_version}"
base_version_next = f"{major_version}.{minor_version}.{patch_version+1}"
release_version = os.getenv('RELEASE_VERSION')
if release_version:
full_version = release_version[1:] if release_version.startswith("v") else release_version
if full_version.lower() == "true":
raise RuntimeError("RELEASE_VERSION must be an explicit version, for example 0.0.1")
else:
full_version = f"{base_version_next}.dev{date_suffix}"
# using read_text to avoid encoding issues:
# UnicodeDecodeError: 'gbk' codec can't decode byte ^^^ in position ^^^: illegal multibyte sequence
setup(
name='func2stream',
version=full_version,
description='Effortlessly transform functions into asynchronous elements for building high-performance pipelines',
long_description=long_description,
long_description_content_type='text/markdown',
author='BI CHENG',
url='https://github.com/BICHENG/func2stream',
packages=find_packages(),
install_requires=[
'loguru',
'numpy>=1.19.5,<1.22; python_version < "3.8"',
'numpy>=1.21.0; python_version >= "3.8"',
],
extras_require={
'test': [
'pytest>=6.2',
],
'video': [
'opencv-python>=4',
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
license='MPL-2.0',
)