-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
75 lines (68 loc) · 2.25 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
71
72
73
74
75
import os
import re
import setuptools
import subprocess
import sys
here = os.path.abspath(os.path.dirname(__file__))
repository_name = "Neradoc/discotool"
current_tag = "main"
try:
if shutil.which("git") is not None:
current_tag = subprocess.run("git describe --tags --abbrev=0",
capture_output = True,
encoding = "utf-8",
shell = True,
).stdout.strip()
except Exception:
pass
with open(os.path.join(here,"README.md"), "r", encoding="utf-8") as fh:
long_description = fh.read()
long_description = re.sub(r'\(docs/(.*.png)\)',
r'(https://raw.githubusercontent.com/' + repository_name
+ '/' + current_tag + r'/docs/\1)',
long_description)
long_description = re.sub(r'\(docs/(.*.md)\)',
r'(https://github.com/' + repository_name
+ '/blob/' + current_tag+r'/docs/\1)',
long_description)
required_modules = [
"click >= 7.1.2",
"click-aliases == 1.0.1",
"psutil >= 5.8.0",
"pyserial >= 3.4",
"wmi;platform_system=='Windows'",
"pywin32;platform_system=='Windows'",
"pyudev;platform_system=='Linux'",
]
setuptools.setup(
name="discotool",
author="Neradoc",
author_email="neraOnGit@ri1.fr",
description="Discover, list, and use USB microcontoller boards.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Neradoc/discotool",
license="MIT",
project_urls={
"Bug Tracker": "https://github.com/Neradoc/discotool/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
],
packages=setuptools.find_packages(where="."),
python_requires=">=3.6",
use_scm_version={
'write_to': 'discotool/_version.py'
},
setup_requires=["setuptools_scm"],
install_requires=required_modules,
entry_points={"console_scripts": ["discotool=discotool.discotool:main"]},
keywords="circuitpython, micropython",
)