mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-05 07:20:13 +01:00
Update build files
This commit is contained in:
parent
58350d868c
commit
7e2b7fbabf
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
|
||||
pip install pytest flake8
|
||||
pip install .
|
||||
python compile_locales.py
|
||||
|
||||
- name: Check code style with flake8 (lint)
|
||||
run: |
|
||||
@ -60,5 +61,6 @@ jobs:
|
||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||
run: |
|
||||
python compile_locales.py
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
||||
|
@ -14,9 +14,10 @@ RUN python -mvenv venv && ./venv/bin/pip install --upgrade pip
|
||||
|
||||
COPY . .
|
||||
|
||||
# Install package from source code
|
||||
# Install package from source code, compile translations
|
||||
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
|
||||
|
@ -35,7 +35,8 @@ RUN if [ "$with_models" = "true" ]; then \
|
||||
|
||||
# Install package from source code
|
||||
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
|
||||
# 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(include=['openpredict']),
|
||||
# package_dir={'openpredict': 'openpredict'},
|
||||
package_data={'': ['static/*', 'static/**/*', 'templates/*']},
|
||||
package_data={'': ['static/*', 'static/**/*', 'templates/*', 'locales/**/meta.json', 'locales/**/.mo']},
|
||||
include_package_data=True,
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
|
Loading…
Reference in New Issue
Block a user