mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-21 23:41:01 +00:00
Update build files
This commit is contained in:
parent
58350d868c
commit
7e2b7fbabf
4 changed files with 8 additions and 4 deletions
2
.github/workflows/publish-package.yml
vendored
2
.github/workflows/publish-package.yml
vendored
|
@ -26,6 +26,7 @@ jobs:
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pytest flake8
|
pip install pytest flake8
|
||||||
pip install .
|
pip install .
|
||||||
|
python compile_locales.py
|
||||||
|
|
||||||
- name: Check code style with flake8 (lint)
|
- name: Check code style with flake8 (lint)
|
||||||
run: |
|
run: |
|
||||||
|
@ -60,5 +61,6 @@ jobs:
|
||||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
|
python compile_locales.py
|
||||||
python setup.py sdist bdist_wheel
|
python setup.py sdist bdist_wheel
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
|
|
|
@ -14,9 +14,10 @@ RUN python -mvenv venv && ./venv/bin/pip install --upgrade pip
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Install package from source code
|
# Install package from source code, compile translations
|
||||||
RUN ./venv/bin/pip install . \
|
RUN ./venv/bin/pip install . \
|
||||||
&& ./venv/bin/pip cache purge
|
&& ./venv/bin/pip cache purge \
|
||||||
|
&& ./venv/bin/python compile_locales.py
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.8.14-slim-bullseye
|
FROM python:3.8.14-slim-bullseye
|
||||||
|
|
|
@ -35,7 +35,8 @@ RUN if [ "$with_models" = "true" ]; then \
|
||||||
|
|
||||||
# Install package from source code
|
# Install package from source code
|
||||||
RUN pip3 install . \
|
RUN pip3 install . \
|
||||||
&& pip3 cache purge
|
&& pip3 cache purge \
|
||||||
|
&& python3 compile_locales.py
|
||||||
|
|
||||||
# Depending on your cuda install you may need to uncomment this line to allow the container to access the cuda libraries
|
# Depending on your cuda install you may need to uncomment this line to allow the container to access the cuda libraries
|
||||||
# See: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
|
# See: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -13,7 +13,7 @@ setup(
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
# packages=find_packages(include=['openpredict']),
|
# packages=find_packages(include=['openpredict']),
|
||||||
# package_dir={'openpredict': 'openpredict'},
|
# package_dir={'openpredict': 'openpredict'},
|
||||||
package_data={'': ['static/*', 'static/**/*', 'templates/*']},
|
package_data={'': ['static/*', 'static/**/*', 'templates/*', 'locales/**/meta.json', 'locales/**/.mo']},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
|
Loading…
Reference in a new issue