rhino/binding/python/setup.py
Go to the documentation of this file.
1 import os
2 import shutil
3 
4 import setuptools
5 
6 os.system('git clean -dfx')
7 
8 package_folder = os.path.join(os.path.dirname(__file__), 'pvrhino')
9 os.mkdir(package_folder)
10 
11 shutil.copy(os.path.join(os.path.dirname(__file__), '../../LICENSE'), package_folder)
12 
13 shutil.copy(os.path.join(os.path.dirname(__file__), '__init__.py'), os.path.join(package_folder, '__init__.py'))
14 shutil.copy(os.path.join(os.path.dirname(__file__), 'rhino.py'), os.path.join(package_folder, 'rhino.py'))
15 shutil.copy(os.path.join(os.path.dirname(__file__), 'util.py'), os.path.join(package_folder, 'util.py'))
16 
17 platforms = ('beaglebone', 'jetson', 'linux', 'mac', 'raspberry-pi', 'windows')
18 
19 os.mkdir(os.path.join(package_folder, 'lib'))
20 for platform in ('common',) + platforms:
21  shutil.copytree(
22  os.path.join(os.path.dirname(__file__), '../../lib', platform),
23  os.path.join(package_folder, 'lib', platform))
24 
25 MANIFEST_IN = """
26 include pvrhino/LICENSE
27 include pvrhino/__init__.py
28 include pvrhino/rhino.py
29 include pvrhino/util.py
30 include pvrhino/lib/common/rhino_params.pv
31 include pvrhino/lib/beaglebone/libpv_rhino.so
32 recursive-include pvrhino/lib/jetson *
33 include pvrhino/lib/linux/x86_64/libpv_rhino.so
34 include pvrhino/lib/mac/x86_64/libpv_rhino.dylib
35 include pvrhino/lib/mac/arm64/libpv_rhino.dylib
36 recursive-include pvrhino/lib/raspberry-pi *
37 include pvrhino/lib/windows/amd64/libpv_rhino.dll
38 """
39 
40 with open(os.path.join(os.path.dirname(__file__), 'MANIFEST.in'), 'w') as f:
41  f.write(MANIFEST_IN.strip('\n '))
42 
43 with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
44  long_description = f.read()
45 
46 setuptools.setup(
47  name="pvrhino",
48  version="2.1.0",
49  author="Picovoice",
50  author_email="hello@picovoice.ai",
51  description="Rhino Speech-to-Intent engine.",
52  long_description=long_description,
53  long_description_content_type="text/markdown",
54  url="https://github.com/Picovoice/rhino",
55  packages=["pvrhino"],
56  include_package_data=True,
57  classifiers=[
58  "Development Status :: 5 - Production/Stable",
59  "Intended Audience :: Developers",
60  "License :: OSI Approved :: Apache Software License",
61  "Operating System :: OS Independent",
62  "Programming Language :: Python :: 3",
63  "Topic :: Multimedia :: Sound/Audio :: Speech"
64  ],
65  python_requires='>=3.5',
66  keywords="Speech-to-Intent, voice commands, voice control, speech recognition, natural language understanding"
67 )


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50