-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
51 lines (43 loc) · 1.29 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
#!/usr/bin/env python3
import os
import re
from setuptools import setup, find_packages
import sys
THIS_PATH = os.path.dirname(os.path.abspath(__file__))
README = open(os.path.join(THIS_PATH, 'README.md')).read()
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search(
"^__version__ = ['\"]([^'\"]+)['\"]",
init_py, re.MULTILINE).group(1)
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
args = {'version': get_version('luxafor')}
print("You probably want to also tag the version now:")
print(" git tag -a %(version)s -m 'version %(version)s'" % args)
print(" git push --tags")
sys.exit()
scripts = {
"console_scripts": [
"luxa=luxafor.cli:cli",
]
}
setup(
name='luxafor',
version=get_version('luxafor'),
description='CLI and libraries to interact with luxafor USB leds',
long_description=README,
author='Felipe Martin',
author_email='[email protected]',
url='https://github.com/fmartingr/pyluxafor',
packages=find_packages(),
install_requires=(
"click>=6.0,<=6.7.99",
"pyusb==1.0.0",
),
entry_points=scripts,
classifiers=[],
)