-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
76 lines (68 loc) · 2.08 KB
/
Copy pathsetup.py
File metadata and controls
76 lines (68 loc) · 2.08 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: i2cy(i2cy@outlook.com)
# Filename: setup
# Created on: 2021/3/6
import setuptools
import re
# Read version without triggering full i2cylib import chain
with open("i2cylib/__init__.py", "r", encoding="utf-8") as f:
_content = f.read()
__VERSION__ = re.search(r"__VERSION__\s*=\s*['\"]([^'\"]+)['\"]", _content).group(1)
try:
from pybind11.setup_helpers import Pybind11Extension, build_ext
HAS_PYBIND11 = True
except ImportError:
HAS_PYBIND11 = False
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
ext_modules = []
cmdclass = {}
if HAS_PYBIND11:
ext_modules = [
Pybind11Extension(
"i2cylib.filesystem.icfat64._icfat64",
["i2cylib/filesystem/icfat64/icfat64.cpp"],
cxx_std=17,
),
]
cmdclass = {"build_ext": build_ext}
setuptools.setup(
name="i2cylib",
version=__VERSION__,
author="I2cy Cloud",
author_email="i2cy@outlook.com",
description="A Python library contains a lot of useful functions and tools",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/i2cy/i2cylib",
project_urls={
"Bug Tracker": "https://github.com/i2cy/i2cylib/issues",
"Source Code": "https://github.com/i2cy/i2cylib",
"Documentation": "https://github.com/i2cy/I2cylib/wiki/API-Document"
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=[
'numpy',
'tqdm',
'rsa',
'pyserial',
'matplotlib',
'hidapi'
],
packages=setuptools.find_packages(),
ext_modules=ext_modules,
cmdclass=cmdclass,
python_requires=">=3.6",
entry_points={'console_scripts':
[
"i2cydbserver = i2cylib.database.I2DB.i2cydbserver:main",
"i2en = i2cylib.crypto.I2En.icen:main",
"i2scan = i2cylib.network.I2Scan.i2scan:main"
]
}
)