Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make workflow binaries broken #42

Closed
ae9is opened this issue Mar 13, 2024 · 2 comments · Fixed by #43
Closed

Make workflow binaries broken #42

ae9is opened this issue Mar 13, 2024 · 2 comments · Fixed by #43
Labels
bug Something isn't working

Comments

@ae9is
Copy link
Owner

ae9is commented Mar 13, 2024

GitHub Actions workflow for building binaries via Nuitka works for nuitka-test-simple but fails for nuitka-test-advanced and ezsam/gui/app.py throwing: ModuleNotFoundError: No module named 'ezsam'

@ae9is ae9is added the bug Something isn't working label Mar 13, 2024
@ae9is
Copy link
Owner Author

ae9is commented Mar 13, 2024

Nuitka/Nuitka-Action@main options:
https://github.com/ae9is/ezsam/blob/3be7aa03ccd880d309a8c6ec22590219dced7018/.github/workflows/make.yml#L57C1-L68C61

  - name: Build executable with Nuitka
    uses: Nuitka/Nuitka-Action@main
    with:
      # ref: https://github.com/Nuitka/Nuitka-Action/blob/main/action.yml
      nuitka-version: main
      enable-plugins: tk-inter
      onefile: true
      onefile-tempdir-spec: '{TEMP}/${{ github.event.inputs.name }}'
      include-data-dir: ${{ github.event.inputs.datadir }}=${{ github.event.inputs.datadir }}
      product-name: ${{ github.event.inputs.name }}
      product-version: ${{ github.event.inputs.version }}
      file-version: ${{ github.event.inputs.version }}
      file-description: ${{ github.event.inputs.description }}
      output-dir: dist
      script-name: ${{ github.event.inputs.scriptname }}

Local builds with Nuitka work fine (via make-nuitka.sh).

Local build script command:

assets="src/ezsam/gui/assets"
description='ezsam is a tool to extract objects from images or video via text prompt - info at https://www.ezsam.org'
dist="dist-nuitka"
tempdir="{TEMP}/ezsam"
outfile="${name}-${version}.bin"
echo "Creating ${name}-${version} at `date` ..."
python -m nuitka --enable-plugin=tk-inter --onefile \
  --onefile-tempdir-spec="${tempdir}" \
  --include-data-dir="${assets}=${assets}" \
  --output-filename="${outfile}" \
  --product-version="${version}" \
  --file-version="${version}" \
  --file-description="${description}" \
  --output-dir="${dist}" "${entrypoint}"

@ae9is
Copy link
Owner Author

ae9is commented Mar 13, 2024

The differences between the two are due to options for Nuitka-Action:

  1. script-name instead of input argument, but they should be the same
  2. output-filename is not a valid parameter in the action, because it's designed to generate executables for multiple platforms at once and so adds a platform specific suffix. Instead, product-name is used to set the embedded name in the executable and the workflow renames the executable later. product-name in the local script defaults to the output-filename's basename, so it is not set locally.

@ae9is ae9is linked a pull request Mar 14, 2024 that will close this issue
@ae9is ae9is closed this as completed in #43 Mar 14, 2024
@ae9is ae9is reopened this Mar 14, 2024
@ae9is ae9is closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant