Update build files

This commit is contained in:
Piero Toffanin 2023-01-06 11:58:32 -05:00
parent 58350d868c
commit 7e2b7fbabf
4 changed files with 8 additions and 4 deletions

View file

@ -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/*

View file

@ -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

View file

@ -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

View file

@ -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': [