mirror of https://github.com/wanadev/yoga.git
Compare commits
27 Commits
Author | SHA1 | Date |
---|---|---|
Fabien LOISON | 10f46a1486 | |
dependabot[bot] | 591b8bea38 | |
Fabien LOISON | 572ccae0b0 | |
dependabot[bot] | b9c06cb414 | |
Fabien LOISON | 667415d603 | |
Fabien LOISON | fffc964b53 | |
Fabien LOISON | 7f2612ea43 | |
Fabien LOISON | 24e24a25f7 | |
Fabien LOISON | b1d0577969 | |
Damien Fernandes | f7bf1d8e1d | |
Fabien LOISON | 0d94c99352 | |
Fabien LOISON | ea76ed0d2d | |
Fabien LOISON | b8308c5098 | |
Fabien LOISON | 7098c7f519 | |
dependabot[bot] | c84ae0333d | |
Fabien LOISON | 6179603311 | |
Fabien LOISON | 55357d2b8a | |
dependabot[bot] | c29003e2d1 | |
Fabien LOISON | 01a713c32a | |
Fabien LOISON | 67c5370f35 | |
Fabien LOISON | 02045ca5fe | |
Fabien LOISON | dbfc65e7e3 | |
Fabien LOISON | 2f00b90e48 | |
Fabien LOISON | 0204383719 | |
Fabien LOISON | 786125df0d | |
Fabien LOISON | 5fc75adb9d | |
Fabien LOISON | fce71f5f5a |
|
@ -3,7 +3,9 @@ name: "Build and Publish Python Packages"
|
|||
|
||||
on:
|
||||
push:
|
||||
tags: "v[0-9]+.[0-9]+.[0-9]+"
|
||||
tags:
|
||||
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
- "v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+"
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -60,7 +62,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: "Build wheels"
|
||||
uses: pypa/cibuildwheel@v2.16.2
|
||||
uses: pypa/cibuildwheel@v2.18.1
|
||||
env:
|
||||
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
|
||||
CIBW_SKIP: cp*-win32
|
||||
|
@ -68,7 +70,7 @@ jobs:
|
|||
- name: "Upload artifacts"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheels
|
||||
name: wheels-${{ matrix.os }}
|
||||
path: ./wheelhouse/*.whl
|
||||
retention-days: 1
|
||||
|
||||
|
@ -89,7 +91,7 @@ jobs:
|
|||
run: |
|
||||
mkdir dist/
|
||||
mv sdist/* dist/
|
||||
mv wheels/*.whl dist/
|
||||
mv wheels-*/*.whl dist/
|
||||
|
||||
- name: "Publish packages on PyPI"
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
name: "Standalone Builds"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
- "v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+"
|
||||
branches:
|
||||
- master
|
||||
pull_request: {}
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
name: "Build Windows standalone version"
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: "Checkout the repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: "Build YOGA Windows Standelone Version"
|
||||
run: |
|
||||
winbuild\builddist.bat
|
||||
|
||||
- name: Archive Windows Build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yoga-vX.X.X_win_standalone_x86-64
|
||||
path: yogawin.dist
|
||||
|
||||
linux:
|
||||
name: "Build Linux standalone version"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: "Checkout the repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: "Build YOGA Linux Standelone Version"
|
||||
run: |
|
||||
linux-bin/build.sh
|
||||
|
||||
- name: "Make the release tarball"
|
||||
run: |
|
||||
mv yoga-bin.dist yoga-v$(python setup.py --version)_linux_standalone_x86-64
|
||||
tar -cvzf yoga-v$(python setup.py --version)_linux_standalone_x86-64.tar.gz yoga-v$(python setup.py --version)_linux_standalone_x86-64
|
||||
|
||||
- name: "Upload Linux tarball"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yoga-vX.X.X_linux_standalone_x86-64
|
||||
path: "yoga-*.tar.gz"
|
|
@ -1,35 +0,0 @@
|
|||
name: "Windows Standalone Build"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: "v[0-9]+.[0-9]+.[0-9]+"
|
||||
branches: master
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
name: "Build Windows standalone version"
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: "Checkout the repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: "Build YOGA Windows Standelone Version"
|
||||
run: |
|
||||
winbuild\builddist.bat
|
||||
|
||||
- name: Archive Windows Build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yoga-vX.X.X_win_standalone_x86-64
|
||||
path: yogawin.dist
|
|
@ -17,3 +17,5 @@ _*.c*
|
|||
.pytest_cache/
|
||||
*.tags
|
||||
/__misc__/
|
||||
yoga-bin.dist
|
||||
yoga-bin.build
|
||||
|
|
42
MANIFEST.in
42
MANIFEST.in
|
@ -1,8 +1,44 @@
|
|||
# YOGA Package
|
||||
include README.rst
|
||||
include LICENSE
|
||||
|
||||
include assimp/CREDITS
|
||||
include assimp/LICENSE
|
||||
include assimp/Readme.md
|
||||
include yoga/model/assimp.h
|
||||
include yoga/model/_assimp.cpp
|
||||
include yoga/model/assimp.cpp
|
||||
|
||||
# Assimp sources
|
||||
recursive-include assimp AUTHORS CREDITS
|
||||
recursive-include assimp README.* Readme.* readme.* README *info.txt README*.txt
|
||||
recursive-include assimp LICENSE License.txt license.txt UNLICENSE
|
||||
recursive-include assimp CMakeLists.txt *.in *.cmake *.cmakein *.ac *.am
|
||||
recursive-include assimp *.bor *.msc
|
||||
recursive-include assimp ChangeLog *Changes.txt
|
||||
recursive-include assimp *.rc
|
||||
recursive-include assimp *.c *.h *.cpp *.hpp *.cc *.inl *.included *.def *.S *.asm
|
||||
recursive-exclude assimp/build *
|
||||
recursive-exclude assimp/doc *
|
||||
recursive-exclude assimp/fuzz *
|
||||
recursive-exclude assimp/packaging *
|
||||
recursive-exclude assimp/port *
|
||||
recursive-exclude assimp/samples *
|
||||
recursive-exclude assimp/scripts *
|
||||
recursive-exclude assimp/test *
|
||||
recursive-exclude assimp/tools *
|
||||
recursive-exclude assimp/contrib/android-cmake *
|
||||
recursive-exclude assimp/contrib/draco/tools *
|
||||
recursive-exclude assimp/contrib/googletest *
|
||||
recursive-exclude assimp/contrib/googletest *
|
||||
recursive-exclude assimp/contrib/zip/test *
|
||||
|
||||
# Repository "noise"
|
||||
global-exclude .git*
|
||||
global-exclude *.png
|
||||
recursive-exclude .github *
|
||||
recursive-exclude doc *
|
||||
recursive-exclude scripts *
|
||||
recursive-exclude test *
|
||||
recursive-exclude winbuild *
|
||||
exclude .flake8
|
||||
exclude noxfile.py
|
||||
exclude requirements*.txt
|
||||
exclude RELEASE.rst
|
||||
|
|
25
README.rst
25
README.rst
|
@ -11,8 +11,8 @@ YOGA - Yummy Optimizer for Gorgeous Assets
|
|||
* convert and optimize images from various format to JPEG, PNG and WEBP,
|
||||
* convert and optimize 3D models from various formats to `glTF and GLB`_.
|
||||
|
||||
**Images** are opened using Pillow_ and optimized using Guetzli_ (for JPEGs),
|
||||
Zopflipng_ (for PNGs) and libwebp_ (for WEBPs).
|
||||
**Images** are opened using Pillow_ and optimized using Guetzli_ and MozJPEG_
|
||||
for JPEGs, Zopflipng_ for PNGs and libwebp_ for WEBPs.
|
||||
|
||||
**3D Models** are converted and optimized using assimp_. If models contain or
|
||||
reference images, they are processed by YOGA's image optimizer.
|
||||
|
@ -32,6 +32,7 @@ EXAMPLE: Converting and optimizing a 3D model from CLI::
|
|||
.. _glTF and GLB: https://www.khronos.org/gltf/
|
||||
.. _Pillow: https://github.com/python-pillow/Pillow
|
||||
.. _Guetzli: https://github.com/google/guetzli
|
||||
.. _MozJPEG: https://github.com/mozilla/mozjpeg
|
||||
.. _Zopflipng: https://github.com/google/zopfli
|
||||
.. _libwebp: https://chromium.googlesource.com/webm/libwebp/
|
||||
.. _assimp: https://github.com/assimp/assimp
|
||||
|
@ -58,12 +59,26 @@ Changelog
|
|||
|
||||
* Nothing yet ;)
|
||||
|
||||
* **v1.3.1-1:**
|
||||
|
||||
* This version has no code change from the v1.3.1. It is only an update of
|
||||
the distribution :
|
||||
|
||||
* A brand new standalone version was build for Linux
|
||||
* The Windows standalone distribution was updated (changes in documentation)
|
||||
|
||||
* dist: Added scripts to build a standalone binary version of YOGA on Linux
|
||||
|
||||
* **v1.3.1:**
|
||||
|
||||
* chore(sdist): Fixed included files in sdist package (@flozz)
|
||||
|
||||
* **v1.3.0:**
|
||||
|
||||
* feat(assimp): Updated assimp to v5.3.1 (fixed build on GCC >= 13)
|
||||
* chore: Removed a script that is no more needed
|
||||
* feat(assimp): Updated assimp to v5.3.1 (fixed build on GCC >= 13) (@flozz)
|
||||
* chore: Removed a script that is no more needed (@flozz)
|
||||
* docs: Updated contributing documentation (libraries, supported Python
|
||||
version, assimp update)
|
||||
version, assimp update) (@flozz)
|
||||
|
||||
* **v1.2.3:**
|
||||
|
||||
|
|
|
@ -33,4 +33,5 @@ Publish source dist and wheels on PyPI.
|
|||
|
||||
* Make a release on Github
|
||||
* Add changelog
|
||||
* Add Windows standalone build from the CI (``winbuild`` workflow)
|
||||
* Add Windows standalone zip from the CI (``standalone-builds`` workflow)
|
||||
* Add Linux standalone tarball from the CI (``standalone-builds`` workflow)
|
||||
|
|
|
@ -51,7 +51,7 @@ You will need the following dependencies to build YOGA:
|
|||
* GCC with C++ 11 support
|
||||
* GNU Make
|
||||
* cmake
|
||||
* Python >= 3.7 (with headers)
|
||||
* Python >= 3.8 (with headers)
|
||||
* Python setuptools
|
||||
* Python CFFI
|
||||
|
||||
|
@ -224,10 +224,11 @@ To run the tests only for a specific Python version, you can use following
|
|||
commands (the corresponding Python interpreter must be installed on your
|
||||
machine)::
|
||||
|
||||
nox -s test-2.7
|
||||
nox -s test-3.7
|
||||
nox -s test-3.8
|
||||
nox -s test-3.9
|
||||
nox -s test-3.10
|
||||
nox -s test-3.11
|
||||
nox -s test-3.12
|
||||
|
||||
YOGA tests are very slow to run (especially the ones related to the image
|
||||
optimization). If you want to run only specific tests, you can run them using
|
||||
|
|
|
@ -11,8 +11,8 @@ Welcome to YOGA's documentation!
|
|||
* convert and optimize images from various format to JPEG, PNG and WEBP,
|
||||
* convert and optimize 3D models from various formats to `glTF and GLB`_.
|
||||
|
||||
**Images** are opened using Pillow_ and optimized using Guetzli_ (for JPEGs),
|
||||
Zopflipng_ (for PNGs) and libwebp_ (for WEBPs).
|
||||
**Images** are opened using Pillow_ and optimized using Guetzli_ and MozJPEG_
|
||||
for JPEGs, Zopflipng_ for PNGs and libwebp_ for WEBPs.
|
||||
|
||||
**3D Models** are converted and optimized using assimp_. If models contain or
|
||||
reference images, they are processed by YOGA's image optimizer.
|
||||
|
@ -20,6 +20,7 @@ reference images, they are processed by YOGA's image optimizer.
|
|||
.. _glTF and GLB: https://www.khronos.org/gltf/
|
||||
.. _Pillow: https://github.com/python-pillow/Pillow
|
||||
.. _Guetzli: https://github.com/google/guetzli
|
||||
.. _MozJPEG: https://github.com/mozilla/mozjpeg
|
||||
.. _Zopflipng: https://github.com/google/zopfli
|
||||
.. _libwebp: https://chromium.googlesource.com/webm/libwebp/
|
||||
.. _assimp: https://github.com/assimp/assimp
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
# YOGA binary for Linux
|
||||
|
||||
> YOGA: Yummy Optimizer for Gorgeous Assets
|
||||
|
||||
YOGA is a command-line tool that:
|
||||
|
||||
* converts and optimizes images from various format to JPEG, PNG and WebP,
|
||||
* converts and optimizes 3D models from various formats to glTF and GLB.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
YOGA does not need any installation. Just unzip the content of this archive
|
||||
and you are ready to go! :)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
YOGA is a CLI (command line) program. To use it, open a terminal in this folder
|
||||
and just use one of the following commands, depending on the terminal you are
|
||||
using.
|
||||
|
||||
./yoga.bin -h
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
Project page and source code:
|
||||
|
||||
* https://github.com/wanadev/yoga
|
||||
|
||||
Documentation:
|
||||
|
||||
* https://wanadev.github.io/yoga/
|
||||
|
||||
Please report any issue on our bug tracker:
|
||||
|
||||
* https://github.com/wanadev/yoga/issues
|
|
@ -0,0 +1,28 @@
|
|||
# YOGA Linux binary
|
||||
|
||||
This forlder contains scripts to compile yoga as an executable binary for Linux.
|
||||
|
||||
## Requirements
|
||||
|
||||
* Python 3.x
|
||||
* Python 3 headers (Debian/Ubuntu: `apt install python3-dev`)
|
||||
* Virtualenv (Debian/Ubuntu: `apt install python3-venv`)
|
||||
* Build tools and CMake (Debian/Ubuntu: `apt install build-essential cmake`)
|
||||
|
||||
|
||||
## Build standalone version from source
|
||||
|
||||
Clone this repository:
|
||||
|
||||
git clone https://github.com/wanadev/yoga.git
|
||||
cd yoga
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
Run the build script (from the root directory of this repository):
|
||||
|
||||
./linux-bin/build.sh
|
||||
|
||||
Once the build finished, you will find the result in the `yoga-bin.dist` folder. To run YOGA, use the `yoga` executable:
|
||||
|
||||
./yoga-bin.dist/yoga.bin -h
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
# Create and/or activate the virtual env
|
||||
mkdir -p build/
|
||||
|
||||
if [ ! -d build/__env__/ ] ; then
|
||||
python3 -m venv build/__env__/
|
||||
source build/__env__/bin/activate
|
||||
pip install -r linux-bin/requirements.txt
|
||||
pip install -e .
|
||||
else
|
||||
source build/__env__/bin/activate
|
||||
fi
|
||||
|
||||
|
||||
# Build YOGA
|
||||
python -m nuitka \
|
||||
--standalone \
|
||||
--follow-imports \
|
||||
--include-package=PIL \
|
||||
linux-bin/yoga-bin.py
|
||||
|
||||
|
||||
# Rename YOGA binary
|
||||
mv yoga-bin.dist/yoga-bin.bin yoga-bin.dist/yoga.bin
|
||||
|
||||
|
||||
# Copy additional files
|
||||
cp LICENSE yoga-bin.dist/LICENSE
|
||||
cp linux-bin/README-linux-dist.md yoga-bin.dist/README.md
|
|
@ -0,0 +1 @@
|
|||
nuitka==2.1.2
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from yoga.__main__ import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
2
setup.py
2
setup.py
|
@ -72,7 +72,7 @@ if os.path.isfile("README.rst"):
|
|||
|
||||
setup(
|
||||
name="yoga",
|
||||
version="1.3.0",
|
||||
version="1.3.1",
|
||||
description="Yummy Optimizer for Gorgeous Assets",
|
||||
url="https://github.com/wanadev/yoga",
|
||||
project_urls={
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
YOGA is a command-line tool that:
|
||||
|
||||
* converts and optimizes images from various format to JPEG and PNG,
|
||||
* converts and optimizes 3D models from various formats to GLB.
|
||||
* converts and optimizes images from various format to JPEG, PNG and WebP,
|
||||
* converts and optimizes 3D models from various formats to glTF and GLB.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
YOGA does not need any installation. Just unzip the content of this directory
|
||||
YOGA does not need any installation. Just unzip the content of this archive
|
||||
and you are ready to go! :)
|
||||
|
||||
|
||||
|
|
|
@ -9,11 +9,6 @@
|
|||
* Visual Studio Build Tools (MSVC and MSBuild)
|
||||
|
||||
|
||||
## Build and install from PYPI
|
||||
|
||||
pip install yoga
|
||||
|
||||
|
||||
## Build standalone version from source
|
||||
|
||||
Clone this repository (using Git Bash):
|
||||
|
|
|
@ -177,9 +177,11 @@ def clean_png(data):
|
|||
chunks.append(
|
||||
{
|
||||
"type": "IDAT",
|
||||
"data": idat_zopfli
|
||||
if len(idat_zopfli) <= len(idat_concat)
|
||||
else idat_concat,
|
||||
"data": (
|
||||
idat_zopfli
|
||||
if len(idat_zopfli) <= len(idat_concat)
|
||||
else idat_concat
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
This module contains functions binded from the Assimp C++ API.
|
||||
"""
|
||||
|
||||
|
||||
from ._assimp import lib, ffi
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
VERSION = "1.3.0"
|
||||
VERSION = "1.3.1"
|
||||
|
|
Loading…
Reference in New Issue