LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.67k stars 151 forks source link

The `appdmg@0.6.6` fails to install on systems with python3 `v3.12.0` #234

Open jozefizso opened 8 months ago

jozefizso commented 8 months ago

We see failures to install the appdmg@0.6.6 on systems running python3 v3.12.0. It can install correctly with python 3.11.0.

See https://github.com/jozefizso/macosrunner-appdmg/actions/runs/6676439380

tk-nguyen commented 8 months ago

Related to this node-gyp issue: https://github.com/nodejs/node-gyp/issues/2869.

It's because distutils is removed from Python 3.12, see https://docs.python.org/dev/whatsnew/3.12.html#distutils for more details. The default python3 on macos-latest/macos-12 is python 3.12.0 (Same with macos-11 and macos-13).

For a workaround, install setuptools through pip:

python3 -m pip install setuptools
BoykoAlex commented 8 months ago

We are also interested in seeing this fixed asap :-)

jozefizso commented 8 months ago

@BoykoAlex if you need fix ASAP I would advise you to write the fix and provide PR.

BoykoAlex commented 8 months ago

Well... the workaround helped so not ASAP ;-)

GitMurf commented 8 months ago

Thanks @tk-nguyen for the setup tools workaround! It worked for me :)

AlexanderOMara commented 8 months ago

The silent failure to install when using optionalDependencies can make this hard to track down.

Adding node-gyp (^10.0.1 in my case) as a dependency also seems to resolve the issue.

jozefizso commented 4 months ago

We fixed this in our GitHub Actions workflows running on macos-14-xlarge like this;

- name: setup python
  uses: actions/setup-python@v5
  with:
    python-version: 3.12

- name: setup appdmg
  run: |
    python3 -m pip install setuptools
    npm install -g appdmg@0.6.6