-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (51 loc) · 1.77 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from os import path
import re
here = path.abspath(path.dirname(__file__))
pkgname = "pydbusbluez"
src_dir = "src"
def find_version(*file_paths):
with open(path.join(here, *file_paths), encoding="utf-8") as f:
version_file = f.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
def long_description(*file_paths):
with open(path.join(here, *file_paths), encoding="utf-8") as f:
return f.read()
setup(
name=pkgname,
version=find_version(src_dir, pkgname, "__init__.py"),
description="Utils for testing and configuration of ble devices via bluez dbus API",
author="Matthias Wauer",
author_email="matthiaswauer@gmail.com",
packages=find_packages(where=src_dir),
package_dir={
"": src_dir,
},
url="https://github.com/LeBlue/pydbus-bluez",
install_requires=[
'pydbus;platform_system=="Linux"'
], # external packages as dependencies
include_package_data=True,
license="MIT",
python_requires="~=3.7",
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Linux",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Testing",
],
entry_points={
"console_scripts": [
"pydbusbluez_dev_info = {}.examples.device_info:main".format(pkgname),
"pydbusbluez_shell = {}.examples.bt_shell:main".format(pkgname),
]
},
)