Compare commits

...

44 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
Fabien LOISON 5fc75adb9d
chore(ci): fixed python-package tag regexp 2024-01-06 17:37:15 +01:00
Fabien LOISON fce71f5f5a
chore(ci): Updated python-package workflow to fix an issue caused by a breaking change in actions/upload-artifact@v4 (see https://github.com/actions/upload-artifact/issues/478) 2024-01-06 17:31:20 +01:00
Fabien LOISON b946eb5f2a
v1.3.0 2024-01-06 16:56:39 +01:00
Fabien LOISON 9e28095ba6
Merge branch 'update-assimp' 2024-01-06 16:49:08 +01:00
Fabien LOISON 8ca8432626
chore: Updated changelog 2024-01-06 16:48:54 +01:00
Fabien LOISON 6bf28043ab
Updated assimp 2024-01-06 16:44:56 +01:00
Fabien LOISON a1d83e798b
docs: Documented how to update assimp 2024-01-06 16:44:25 +01:00
Fabien LOISON e0f35a8598
chore: Removed listing of all c/c++ and assimp source from MANIFEST.in as it is no more required. Also removed the script that updated this file 2024-01-06 16:39:30 +01:00
Fabien LOISON 2678c3a4ae
docs: Updated used libraries and supported Python versions 2024-01-06 15:50:38 +01:00
Fabien LOISON a1d5312273
Merge pull request #55 from wanadev/dependabot/github_actions/actions/download-artifact-4
Bump actions/download-artifact from 3 to 4
2023-12-18 09:57:13 +01:00
Fabien LOISON 70849b8c26
Merge pull request #54 from wanadev/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2023-12-18 09:57:01 +01:00
dependabot[bot] 8857a02445
Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 05:52:26 +00:00
dependabot[bot] 7c48dc8555
Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 05:52:22 +00:00
Fabien LOISON 3bd861239b
Merge pull request #53 from wanadev/dependabot/github_actions/actions/setup-python-5
Bump actions/setup-python from 4 to 5
2023-12-11 09:52:47 +01:00
dependabot[bot] bd8abafb6d
Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 05:27:01 +00:00
Fabien LOISON a6ddab32c6
Merge pull request #52 from wanadev/dependabot/github_actions/pypa/cibuildwheel-2.16.2
Bump pypa/cibuildwheel from 2.16.1 to 2.16.2
2023-10-09 10:05:33 +02:00
dependabot[bot] a58b3c17f7
Bump pypa/cibuildwheel from 2.16.1 to 2.16.2
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.1 to 2.16.2.
- [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.1...v2.16.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 06:02:30 +00:00
Fabien LOISON e459110ac4
Windows standalone build: rollback to Python 3.11 as Nuitka is not working with 3.12 2023-10-06 14:46:35 +02:00
Fabien LOISON deef18712b
Updated Nuitka for Windows standalone build 2023-10-06 14:32:52 +02:00
28 changed files with 308 additions and 1349 deletions

View File

@ -20,7 +20,7 @@ jobs:
submodules: true
- name: "Set up Python"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"

View File

@ -21,7 +21,7 @@ jobs:
submodules: true
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

View File

@ -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:
@ -20,7 +22,7 @@ jobs:
submodules: true
- name: "Set up Python"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
@ -33,7 +35,7 @@ jobs:
python setup.py sdist
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/
@ -60,15 +62,15 @@ jobs:
submodules: true
- name: "Build wheels"
uses: pypa/cibuildwheel@v2.16.1
uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_SKIP: cp*-win32
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
retention-days: 1
@ -83,13 +85,13 @@ jobs:
steps:
- name: "Download artifacts"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: "Move packages to the dist/ folder"
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

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@v4
with:
python-version: "3.12"
- name: "Build YOGA Windows Standelone Version"
run: |
winbuild\builddist.bat
- name: Archive Windows Build
uses: actions/upload-artifact@v3
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,4 +1,4 @@
Copyright (c) 2017-2021, Wanadev <http://www.wanadev.fr/>
Copyright (c) 2017-2024, Wanadev <http://www.wanadev.fr/>
All rights reserved.
Redistribution and use in source and binary forms, with or without

File diff suppressed because it is too large Load Diff

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,6 +59,27 @@ 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) (@flozz)
* chore: Removed a script that is no more needed (@flozz)
* docs: Updated contributing documentation (libraries, supported Python
version, assimp update) (@flozz)
* **v1.2.3:**
* Code quality: more robust type comparison (@flozz)

View File

@ -7,9 +7,8 @@ This file is a memo for the maintainer.
0. Checks
---------
* If assimp has been updated, ensure ``./scripts/generate_manifest_in.sh`` has
been run, generate an sdist package and check we are able to build a wheel
from it.
* Check years in ``LICENSE``
* Check years in ``docs/conf.py``
1. Release
@ -34,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)

2
assimp

@ -1 +1 @@
Subproject commit 21d7085be6b7a3c6912ce33d9931688dc1a4a6dc
Subproject commit 6a08c39e3a91ef385e76515cfad86aca4bfd57ff

View File

@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------
project = 'YOGA'
copyright = '2021, Wanadev'
copyright = '2017-2024, Wanadev'
author = 'Wanadev'

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
@ -96,15 +96,17 @@ Linux as operating system and a POSIX shell (like Bash or ZSH).
Programming languages used in this project:
* Python_ (2.7, 3.7, 3.8 and 3.9)
* Python_ (3.8 to 3.12)
* C++
Libraries:
* CFFI_: C/Python binding
* imagequant_: Color quantization (to reduce number of colors in an image)
* mozjpeg-lossless-optimization_: Lossless JPEG optimization
* Pillow_: Image processing library
* PyGuetzli_: JPEG optimization
* ZopfliPy_: PNG Optimization
* ZopfliPy_: PNG optimization
Development tools:
@ -222,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
@ -249,9 +252,37 @@ Then you can run the following command::
nox -s gendoc
Updating ASSIMP
---------------
ASSIMP is the C++ library used by YOGA to manipulate 3D models. To update it,
first check the latest version tag on the project's repo :
* https://github.com/assimp/assimp/tags
Then go to the assimp subfolder and checkout the latest release tag::
cd assimp/
git fetch
git checkout vX.Y.Z
cd ..
Then, run tests to ensure YOGA still work::
nox -s test
Finally, check we are still able to build a wheel from the sdist package::
nox -s test_build_wheel
If the build fails because of a missing file, add it in ``MANIFEST.in``.
.. _Python: https://www.python.org/
.. _CFFI: https://cffi.readthedocs.io/en/latest/
.. _imagequant: https://github.com/wanadev/imagequant-python
.. _mozjpeg-lossless-optimization: https://github.com/wanadev/mozjpeg-lossless-optimization
.. _Pillow: https://pillow.readthedocs.io/en/stable/
.. _PyGuetzli: https://github.com/wanadev/pyguetzli
.. _ZopfliPy: https://github.com/hattya/zopflipy

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

@ -8,6 +8,8 @@ PYTHON_FILES = [
"noxfile.py",
]
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]
@nox.session(reuse_venv=True)
def lint(session):
@ -42,13 +44,19 @@ def black_fix(session):
session.run("black", *PYTHON_FILES)
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"], reuse_venv=True)
@nox.session(python=PYTHON_VERSIONS, reuse_venv=True)
def test(session):
session.install("pytest")
session.install(".")
session.run("pytest", "-v", "test")
@nox.session(reuse_venv=False)
def test_build_wheel(session):
session.install("build")
session.run("python", "-m", "build")
@nox.session(reuse_venv=True)
def gendoc(session):
session.install("sphinx", "sphinx-rtd-theme")

View File

@ -1,35 +0,0 @@
#!/bin/bash
##
## Lists the files to include in sdist distribution. This can be used to
## generate the MANIFEST.in contents:
##
## scripts/generate_manifest_in.sh > MANIFEST.in
##
echo "include README.rst"
echo "include LICENSE"
echo
find yoga/model -name "*.h" -exec echo "include" "{}" ";"
find yoga/model -name "*.c" -exec echo "include" "{}" ";"
find yoga/model -name "*.cpp" -exec echo "include" "{}" ";"
echo
echo "include assimp/CREDITS"
echo "include assimp/LICENSE"
echo "include assimp/README.md"
echo "include assimp/CMakeLists.txt"
find assimp -type f -name "*.in" -exec echo "include" "{}" ";" \
| grep -v "^include assimp/\(include\|cmake-modules\|contrib\|test\|doc\)/"
find assimp/cmake-modules -type f -exec echo "include" "{}" ";"
find assimp/code -type f -exec echo "include" "{}" ";"
find assimp/contrib -type f -exec echo "include" "{}" ";" \
| grep -v "^include assimp/contrib/gtest"
find assimp/include -type f -exec echo "include" "{}" ";"
echo
echo "recursive-exclude test *"

View File

@ -72,7 +72,7 @@ if os.path.isfile("README.rst"):
setup(
name="yoga",
version="1.2.3",
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

@ -1 +1 @@
nuitka==0.9
nuitka==1.8.3

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.2.3"
VERSION = "1.3.1"