Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python: [3.12]
python: [3.13.13]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
15 changes: 13 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from setuptools import setup
import sys

from setuptools import Distribution, setup

APP = ['main.py']
DATA_FILES = ['']
Expand All @@ -11,8 +13,17 @@
'includes': ['Cocoa'],
}

class Py2AppDistribution(Distribution):
"""Clear install_requires for py2app to avoid DistutilsOptionError."""
def finalize_options(self):
super().finalize_options()
if "py2app" in sys.argv:
self.install_requires = []


setup(
app=APP,
options={'py2app': OPTIONS},
distclass=Py2AppDistribution,
setup_requires=['py2app'],
)
)
Loading