-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
52 lines (45 loc) · 1.67 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
import re
from pathlib import Path
from setuptools import setup, find_packages
__folder__ = Path(__file__).parent
def read(*path_leaves, **kwargs):
kwargs.setdefault('encoding', "utf-8")
with Path(__folder__, *path_leaves).open(**kwargs) as f:
return f.read()
def find_version(*path_leaves):
version_file = read(*path_leaves)
version_match = re.search(r"^__version__ = (['\"])(.*?)\1", version_file, re.M)
if version_match:
return version_match.group(2)
else:
raise RuntimeError("Unable to find version string.")
setup(
name="airpods-helper",
packages=find_packages(exclude=["tests"]),
version=find_version("airpods_helper", "__init__.py"),
description="Small utility to automate Apple Airpods connection process",
long_description=read("README.md"),
url="https://github.com/thevar1able/airpods-helper",
author="thevar1able",
author_email="[email protected]",
license='MIT',
classifiers=[
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'Environment :: No Input/Output (Daemon)',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: MIT License',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Topic :: System :: Hardware :: Hardware Drivers',
],
keywords=["airpods", "dbus", "bluetooth", "bluez", "mpris"],
entry_points={
'console_scripts': [
"airpods-helper=airpods_helper.__main__:main",
],
},
install_requires=["PyGObject", "pydbus"],
python_requires=">=3.6",
)