-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (63 loc) · 1.9 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
from setuptools import setup, find_packages
from datetime import date
from pkg_resources import packaging
from platform import python_version
def readme():
with open("README.md") as f:
return f.read()
def version():
with open("birdprobe/__init__.py") as fd:
for line in fd:
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string.")
def install_requires():
requires = [
"birdnetlib>=0.5.1",
"librosa",
"resampy",
"pyaudio",
"paho-mqtt",
]
# Python 3.11 wheels for tflite-runtime are not available, yet:
# https://github.com/tensorflow/tensorflow/issues/60115
#
# Use tensorflow as a fallback.
if packaging.version.parse(python_version()) >= packaging.version.parse("3.11"):
requires += ["tensorflow"]
else:
requires += ["tflite-runtime>=2.12.0"]
return requires
setup(
name="birdprobe",
version=version(),
description="Detects birds from live recording based on birdnetlib.",
author="Thomas Liske",
author_email="thomas@fiasko-nw.net",
long_description=readme(),
long_description_content_type="text/markdown",
url="https://codeberg.net/liske/birdprobe",
license="AGPL3+",
packages=find_packages(),
install_requires=install_requires(),
extras_require={
'gps': [
'gpsd-py3'
],
'pixelring': [
'pixel_ring'
],
'ws-epd': [
'waveshare-epaper',
]
},
entry_points={
"console_scripts": [
"birdprobe-detector = birdprobe.birdnet:main",
"birdprobe-display = birdprobe.display:main",
"birdprobe-location = birdprobe.location:main",
"birdprobe-sysclock = birdprobe.sysclock:main",
]
},
)