-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
338 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Copyright 2022 Picovoice Inc. | ||
# Copyright 2022-2023 Picovoice Inc. | ||
# | ||
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" | ||
# file accompanying this source. | ||
|
@@ -14,44 +14,41 @@ | |
|
||
import setuptools | ||
|
||
INCLUDE_FILES = ('../../LICENSE', '__init__.py', '_factory.py', '_cheetah.py', '_util.py') | ||
INCLUDE_LIBS = ('linux', 'mac', 'windows', 'jetson', 'raspberry-pi') | ||
|
||
os.system('git clean -dfx') | ||
|
||
package_folder = os.path.join(os.path.dirname(__file__), 'pvcheetah') | ||
os.mkdir(package_folder) | ||
manifest_in = "" | ||
|
||
shutil.copy(os.path.join(os.path.dirname(__file__), '../../LICENSE'), package_folder) | ||
|
||
shutil.copy(os.path.join(os.path.dirname(__file__), '__init__.py'), os.path.join(package_folder, '__init__.py')) | ||
shutil.copy(os.path.join(os.path.dirname(__file__), '_cheetah.py'), os.path.join(package_folder, '_cheetah.py')) | ||
shutil.copy(os.path.join(os.path.dirname(__file__), '_factory.py'), os.path.join(package_folder, '_factory.py')) | ||
shutil.copy(os.path.join(os.path.dirname(__file__), '_util.py'), os.path.join(package_folder, '_util.py')) | ||
for rel_path in INCLUDE_FILES: | ||
shutil.copy(os.path.join(os.path.dirname(__file__), rel_path), package_folder) | ||
manifest_in += "include pvcheetah/%s\n" % os.path.basename(rel_path) | ||
|
||
platforms = ('jetson', 'linux', 'mac', 'raspberry-pi', 'windows') | ||
model_file = 'lib/common/cheetah_params.pv' | ||
os.makedirs(os.path.join(package_folder, os.path.split(model_file)[0])) | ||
shutil.copy( | ||
os.path.join(os.path.dirname(__file__), '../..', model_file), | ||
os.path.join(package_folder, model_file)) | ||
manifest_in += "include pvcheetah/%s\n" % model_file | ||
|
||
os.mkdir(os.path.join(package_folder, 'lib')) | ||
for platform in ('common',) + platforms: | ||
for platform in INCLUDE_LIBS: | ||
shutil.copytree( | ||
os.path.join(os.path.dirname(__file__), '../../lib', platform), | ||
os.path.join(package_folder, 'lib', platform)) | ||
|
||
MANIFEST_IN = """ | ||
include pvcheetah/LICENSE | ||
include pvcheetah/__init__.py | ||
include pvcheetah/_cheetah.py | ||
include pvcheetah/_factory.py | ||
include pvcheetah/_util.py | ||
recursive-include pvcheetah/lib/ * | ||
""" | ||
manifest_in += "recursive-include pvcheetah/lib/%s *\n" % platform | ||
|
||
with open(os.path.join(os.path.dirname(__file__), 'MANIFEST.in'), 'w') as f: | ||
f.write(MANIFEST_IN.strip('\n ')) | ||
f.write(manifest_in) | ||
|
||
with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f: | ||
long_description = f.read() | ||
|
||
setuptools.setup( | ||
name="pvcheetah", | ||
version="1.1.3", | ||
version="2.0.0", | ||
author="Picovoice", | ||
author_email="[email protected]", | ||
description="Cheetah Speech-to-Text Engine.", | ||
|
Oops, something went wrong.