pvrecorder/sdk/python/setup.py
Go to the documentation of this file.
1 #
2 # Copyright 2021 Picovoice Inc.
3 #
4 # You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
5 # file accompanying this source.
6 #
7 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9 # specific language governing permissions and limitations under the License.
10 #
11 
12 import os
13 import shutil
14 
15 import setuptools
16 
17 os.system('git clean -dfx')
18 
19 package_folder = os.path.join(os.path.dirname(__file__), 'pvrecorder')
20 os.mkdir(package_folder)
21 
22 shutil.copy(os.path.join(os.path.dirname(__file__), '../../LICENSE'), package_folder)
23 
24 shutil.copy(os.path.join(os.path.dirname(__file__), '__init__.py'), os.path.join(package_folder, '__init__.py'))
25 shutil.copy(os.path.join(os.path.dirname(__file__), 'pvrecorder.py'), os.path.join(package_folder, 'pvrecorder.py'))
26 
27 shutil.copytree(
28  os.path.join(os.path.dirname(__file__), '../../scripts'),
29  os.path.join(package_folder, 'scripts'))
30 
31 platforms = ('beaglebone', 'jetson', 'linux', 'mac', 'raspberry-pi', 'windows')
32 
33 os.mkdir(os.path.join(package_folder, 'lib'))
34 for platform in platforms:
35  shutil.copytree(
36  os.path.join(os.path.dirname(__file__), '../../lib', platform),
37  os.path.join(package_folder, 'lib', platform))
38 
39 MANIFEST_IN = """
40 include pvrecorder/LICENSE
41 include pvrecorder/__init__.py
42 include pvrecorder/pv_recorder.py
43 include pvrecorder/lib/beaglebone/libpv_recorder.so
44 recursive-include pvrecorder/lib/jetson *
45 include pvrecorder/lib/linux/x86_64/libpv_recorder.so
46 include pvrecorder/lib/mac/x86_64/libpv_recorder.dylib
47 include pvrecorder/lib/mac/arm64/libpv_recorder.dylib
48 recursive-include pvrecorder/lib/raspberry-pi *
49 include pvrecorder/lib/windows/amd64/libpv_recorder.dll
50 recursive-include pvrecorder/scripts *
51 """
52 
53 with open(os.path.join(os.path.dirname(__file__), 'MANIFEST.in'), 'w') as f:
54  f.write(MANIFEST_IN.strip('\n '))
55 
56 with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
57  long_description = f.read()
58 
59 setuptools.setup(
60  name="pvrecorder",
61  version="1.0.2",
62  author="Picovoice",
63  author_email="hello@picovoice.ai",
64  description="Recorder library for Picovoice.",
65  long_description=long_description,
66  long_description_content_type="text/markdown",
67  url="https://github.com/Picovoice/pvrecorder",
68  packages=["pvrecorder"],
69  install_requires=["enum34"],
70  include_package_data=True,
71  classifiers=[
72  "Development Status :: 5 - Production/Stable",
73  "Intended Audience :: Developers",
74  "License :: OSI Approved :: Apache Software License",
75  "Operating System :: OS Independent",
76  "Programming Language :: Python :: 3",
77  "Topic :: Multimedia :: Sound/Audio :: Speech"
78  ],
79  python_requires='>=3',
80  keywords="audio recorder",
81 )


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