Compare commits

...

25 Commits

Author SHA1 Message Date
Fabien LOISON 10f46a1486
Merge pull request #62 from wanadev/dependabot/github_actions/pypa/cibuildwheel-2.18.1
chore(deps): bump pypa/cibuildwheel from 2.18.0 to 2.18.1
2024-05-27 09:10:23 +02:00
dependabot[bot] 591b8bea38
chore(deps): bump pypa/cibuildwheel from 2.18.0 to 2.18.1
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.18.0 to 2.18.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.18.0...v2.18.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 05:45:34 +00:00
Fabien LOISON 572ccae0b0
Merge pull request #61 from wanadev/dependabot/github_actions/pypa/cibuildwheel-2.18.0
Bump pypa/cibuildwheel from 2.17.0 to 2.18.0
2024-05-13 09:07:35 +02:00
dependabot[bot] b9c06cb414
Bump pypa/cibuildwheel from 2.17.0 to 2.18.0
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.17.0 to 2.18.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.17.0...v2.18.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 05:57:14 +00:00
Fabien LOISON 667415d603
docs(release): Updated maintainer release memo 2024-04-17 11:16:43 +02:00
Fabien LOISON fffc964b53
v1.3.1-1 2024-04-17 11:09:48 +02:00
Fabien LOISON 7f2612ea43
ci(standalone-builds): Make a tarball for Linux standalone releases 2024-04-17 10:53:00 +02:00
Fabien LOISON 24e24a25f7
misc(ci): Run standalone builds on PR 2024-04-17 10:22:23 +02:00
Fabien LOISON b1d0577969
Merge pull request #60 from damienfern/master
ci(standelone-builds): build a standalone version for Linux x86_64
2024-04-15 11:19:50 +02:00
Damien Fernandes f7bf1d8e1d
ci(github-action): build and upload executable binary on release 2024-04-15 10:48:18 +02:00
Fabien LOISON 0d94c99352
fix: Added missing yoga-bin.py file, required to build the linux binary version 2024-04-12 12:48:45 +02:00
Fabien LOISON ea76ed0d2d
feat: Added scripts to build a redistribuable Linux binary 2024-03-20 14:04:17 +01:00
Fabien LOISON b8308c5098
docs: Updated winbuild docs and distributed Windows README 2024-03-20 13:55:08 +01:00
Fabien LOISON 7098c7f519
Merge pull request #59 from wanadev/dependabot/github_actions/pypa/cibuildwheel-2.17.0
Bump pypa/cibuildwheel from 2.16.5 to 2.17.0
2024-03-18 08:58:31 +01:00
dependabot[bot] c84ae0333d
Bump pypa/cibuildwheel from 2.16.5 to 2.17.0
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.5 to 2.17.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.5...v2.17.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 05:21:28 +00:00
Fabien LOISON 6179603311
docs: Added MozJPEG to the list of used optimization libraries 2024-02-12 09:53:38 +01:00
Fabien LOISON 55357d2b8a
Merge pull request #58 from wanadev/dependabot/github_actions/pypa/cibuildwheel-2.16.5
Bump pypa/cibuildwheel from 2.16.2 to 2.16.5
2024-02-05 09:59:16 +01:00
dependabot[bot] c29003e2d1
Bump pypa/cibuildwheel from 2.16.2 to 2.16.5
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.2 to 2.16.5.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.2...v2.16.5)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 05:41:36 +00:00
Fabien LOISON 01a713c32a
chore: Fixed coding style according to Black 24.x 2024-01-29 09:31:16 +01:00
Fabien LOISON 67c5370f35
docs: Updated Python version in contributing doc 2024-01-15 16:31:30 +01:00
Fabien LOISON 02045ca5fe
chore(ci): fixed a regexp in winbuild workflow 2024-01-08 11:18:51 +01:00
Fabien LOISON dbfc65e7e3
chore(ci): fixed a regexp in python packaging workflow 2024-01-08 11:08:24 +01:00
Fabien LOISON 2f00b90e48
docs: Updated changelog to add authors of changes 2024-01-07 12:35:45 +01:00
Fabien LOISON 0204383719
v1.3.1 2024-01-07 11:57:21 +01:00
Fabien LOISON 786125df0d
chore(sdist): Fixed included files in sdist package 2024-01-07 11:55:26 +01:00
20 changed files with 252 additions and 66 deletions

View File

@ -4,8 +4,8 @@ name: "Build and Publish Python Packages"
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-[0-9]+"
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
- "v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+"
jobs:
@ -62,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

65
.github/workflows/standalone-builds.yml vendored Normal file
View File

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

View File

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

2
.gitignore vendored
View File

@ -17,3 +17,5 @@ _*.c*
.pytest_cache/
*.tags
/__misc__/
yoga-bin.dist
yoga-bin.build

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

28
linux-bin/README.md Normal file
View File

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

31
linux-bin/build.sh Executable file
View File

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

View File

@ -0,0 +1 @@
nuitka==2.1.2

6
linux-bin/yoga-bin.py Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env python
from yoga.__main__ import main
if __name__ == "__main__":
main()

View File

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

View File

@ -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! :)

View File

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

View File

@ -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
),
}
)

View File

@ -2,7 +2,6 @@
This module contains functions binded from the Assimp C++ API.
"""
from ._assimp import lib, ffi

View File

@ -1 +1 @@
VERSION = "1.3.0"
VERSION = "1.3.1"