Adjust shell scripts to use root of repo
This commit is contained in:
parent
016e11a036
commit
9b0065deb8
6 changed files with 27 additions and 46 deletions
|
|
@ -26,8 +26,15 @@ echo 'Installing Python dependencies'
|
||||||
pip3 ${PIP_INSTALL} --upgrade pip
|
pip3 ${PIP_INSTALL} --upgrade pip
|
||||||
pip3 ${PIP_INSTALL} --upgrade wheel setuptools
|
pip3 ${PIP_INSTALL} --upgrade wheel setuptools
|
||||||
|
|
||||||
find "${this_dir}" -name 'requirements*.txt' -type f -print0 | \
|
# Install Mimic 3
|
||||||
xargs -0 -n1 pip3 ${PIP_INSTALL} -r
|
pip3 ${PIP_INSTALL} -e "${this_dir}/opentts-abc"
|
||||||
|
|
||||||
|
# Include support for languages besides English
|
||||||
|
pushd "${this_dir}/mimic3-tts" 2>/dev/null
|
||||||
|
pip3 ${PIP_INSTALL} -e '.[de,fr,it,nl,ru,sw]'
|
||||||
|
popd 2>/dev/null
|
||||||
|
|
||||||
|
pip3 ${PIP_INSTALL} -e "${this_dir}/mimic3-http"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -6,15 +6,14 @@ this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
|
||||||
# Kebab to snake case
|
# Kebab to snake case
|
||||||
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
||||||
src_dir="${this_dir}/${module_name}"
|
base_dir="$(realpath "${this_dir}/..")"
|
||||||
|
|
||||||
# Path to virtual environment
|
# Path to virtual environment
|
||||||
: "${venv:=${this_dir}/.venv}"
|
: "${venv:=${base_dir}/.venv}"
|
||||||
|
|
||||||
if [ -d "${venv}" ]; then
|
if [ -d "${venv}" ]; then
|
||||||
# Activate virtual environment if available
|
# Activate virtual environment if available
|
||||||
source "${venv}/bin/activate"
|
source "${venv}/bin/activate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PYTHONPATH="${this_dir}"
|
|
||||||
python3 -m "${module_name}" "$@"
|
python3 -m "${module_name}" "$@"
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,14 @@ this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
|
||||||
# Kebab to snake case
|
# Kebab to snake case
|
||||||
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
||||||
src_dir="${this_dir}/${module_name}"
|
base_dir="$(realpath "${this_dir}/..")"
|
||||||
|
|
||||||
# Path to virtual environment
|
# Path to virtual environment
|
||||||
: "${venv:=${this_dir}/.venv}"
|
: "${venv:=${base_dir}/.venv}"
|
||||||
|
|
||||||
if [ -d "${venv}" ]; then
|
if [ -d "${venv}" ]; then
|
||||||
# Activate virtual environment if available
|
# Activate virtual environment if available
|
||||||
source "${venv}/bin/activate"
|
source "${venv}/bin/activate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PYTHONPATH="${this_dir}"
|
|
||||||
python3 -m "${module_name}.download" "$@"
|
python3 -m "${module_name}.download" "$@"
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
# Directory of *this* script
|
|
||||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
|
||||||
|
|
||||||
# Path to virtual environment
|
|
||||||
: "${venv:=${this_dir}/.venv}"
|
|
||||||
|
|
||||||
# Python binary to use
|
|
||||||
: "${PYTHON=python3}"
|
|
||||||
|
|
||||||
# pip install command
|
|
||||||
: "${PIP_INSTALL=install}"
|
|
||||||
|
|
||||||
python_version="$(${PYTHON} --version)"
|
|
||||||
|
|
||||||
# Create virtual environment
|
|
||||||
echo "Creating virtual environment at ${venv} (${python_version})"
|
|
||||||
rm -rf "${venv}"
|
|
||||||
"${PYTHON}" -m venv "${venv}"
|
|
||||||
source "${venv}/bin/activate"
|
|
||||||
|
|
||||||
# Install Python dependencies
|
|
||||||
echo 'Installing Python dependencies'
|
|
||||||
pip3 ${PIP_INSTALL} --upgrade pip
|
|
||||||
pip3 ${PIP_INSTALL} --upgrade wheel setuptools
|
|
||||||
|
|
||||||
find "${this_dir}" -name 'requirements*.txt' -type f -print0 | \
|
|
||||||
xargs -0 -n1 pip3 ${PIP_INSTALL} -r
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
echo "OK"
|
|
||||||
|
|
@ -6,15 +6,14 @@ this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
|
||||||
# Kebab to snake case
|
# Kebab to snake case
|
||||||
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
||||||
src_dir="${this_dir}/${module_name}"
|
base_dir="$(realpath "${this_dir}/..")"
|
||||||
|
|
||||||
# Path to virtual environment
|
# Path to virtual environment
|
||||||
: "${venv:=${this_dir}/.venv}"
|
: "${venv:=${base_dir}/.venv}"
|
||||||
|
|
||||||
if [ -d "${venv}" ]; then
|
if [ -d "${venv}" ]; then
|
||||||
# Activate virtual environment if available
|
# Activate virtual environment if available
|
||||||
source "${venv}/bin/activate"
|
source "${venv}/bin/activate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PYTHONPATH="${this_dir}"
|
|
||||||
python3 -m "${module_name}" "$@"
|
python3 -m "${module_name}" "$@"
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
from collections import defaultdict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
@ -59,6 +60,16 @@ for lang in [
|
||||||
]:
|
]:
|
||||||
extras[f"gruut[{lang}]"] = [lang]
|
extras[f"gruut[{lang}]"] = [lang]
|
||||||
|
|
||||||
|
# Add "all" tag
|
||||||
|
for tags in extras.values():
|
||||||
|
tags.append("all")
|
||||||
|
|
||||||
|
# Invert for setup
|
||||||
|
extras_require = defaultdict(list)
|
||||||
|
for dep, tags in extras.items():
|
||||||
|
for tag in tags:
|
||||||
|
extras_require[tag].append(dep)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
@ -72,7 +83,7 @@ setup(
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
package_data={"mimic3_tts": ["VERSION", "py.typed"]},
|
package_data={"mimic3_tts": ["VERSION", "py.typed"]},
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
extras_require={':python_version<"3.9"': ["importlib_resources"], **extras},
|
extras_require={':python_version<"3.9"': ["importlib_resources"], **extras_require},
|
||||||
entry_points={"console_scripts": ["mimic3 = mimic3_cli.__main__:main"]},
|
entry_points={"console_scripts": ["mimic3 = mimic3_cli.__main__:main"]},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 3 - Alpha",
|
"Development Status :: 3 - Alpha",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue