Skip to content

Commit d370c6a

Browse files
authored
Merge pull request #77 from plotdevice/maintenance-2025
Maintenance 2025
2 parents be7dc22 + 23e234f commit d370c6a

14 files changed

Lines changed: 27 additions & 25 deletions

File tree

PlotDevice.xcodeproj/project.pbxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@
607607
INFOPLIST_FILE = app/info.plist;
608608
INSTALL_PATH = /Applications;
609609
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../Frameworks/Python.framework";
610-
MACOSX_DEPLOYMENT_TARGET = 11.0;
610+
MACOSX_DEPLOYMENT_TARGET = 10.13;
611611
ONLY_ACTIVE_ARCH = NO;
612612
OTHER_LDFLAGS = "$(inherited)";
613613
PRODUCT_BUNDLE_IDENTIFIER = io.plotdevice.PlotDevice;
@@ -625,6 +625,7 @@
625625
CODE_SIGN_IDENTITY = "-";
626626
COMBINE_HIDPI_IMAGES = YES;
627627
CONFIGURATION_BUILD_DIR = dist;
628+
COPY_PHASE_STRIP = YES;
628629
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
629630
ENABLE_HARDENED_RUNTIME = YES;
630631
FRAMEWORK_SEARCH_PATHS = (
@@ -637,7 +638,7 @@
637638
INFOPLIST_FILE = app/info.plist;
638639
INSTALL_PATH = /Applications;
639640
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../Frameworks/Python.framework";
640-
MACOSX_DEPLOYMENT_TARGET = 11.0;
641+
MACOSX_DEPLOYMENT_TARGET = 10.13;
641642
OTHER_LDFLAGS = "$(inherited)";
642643
PRODUCT_BUNDLE_IDENTIFIER = io.plotdevice.PlotDevice;
643644
PRODUCT_NAME = PlotDevice;

app/python.xcconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generated by deps/frameworks/config.py
22
PYTHON_FRAMEWORK = $(PROJECT_DIR)/deps/frameworks/Python.framework
3-
PYTHON = $(PYTHON_FRAMEWORK)/Versions/3.11/bin/python3
4-
LIBRARY_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.11/lib/python3.11/config-3.11-darwin
5-
HEADER_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.11/include/python3.11
6-
OTHER_LDFLAGS = $(inherited) -lpython3.11
3+
PYTHON = $(PYTHON_FRAMEWORK)/Versions/3.13/bin/python3
4+
LIBRARY_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.13/lib/python3.13/config-3.13-darwin
5+
HEADER_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.13/include/python3.13
6+
OTHER_LDFLAGS = $(inherited) -lpython3.13
77
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) PYTHON_BIN="$(PYTHON)" PY3K=1

deps/frameworks/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PYTHON_VERSION = 3.11.9
1+
PYTHON_VERSION = 3.13.3
22
FRAMEWORK_REPO = https://github.com/gregneagle/relocatable-python.git
33
BUILD_OPTS = --os-version=11 --python-version=$(PYTHON_VERSION) --upgrade-pip --pip-requirements=requirements.txt
44
BIN = ./Python.framework/Versions/Current/bin
@@ -11,6 +11,7 @@ PIP_INCLUDES = $(shell $(BIN)/python3-config --includes)
1111

1212
all: Python.framework
1313
$(PIP_ENV) CFLAGS="$(PIP_INCLUDES)" $(BIN)/pip3 install --upgrade ../..
14+
find $(shell find ./Python.framework -name py2app -type d) -name main-\* -not -name \*universal2 -delete
1415

1516
Python.framework: relocatable-python
1617
PYTHONNOUSERSITE=1 $(PIP_ENV) python3 ./relocatable-python/make_relocatable_python_framework.py $(BUILD_OPTS)

deps/frameworks/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
xattr
33
cachecontrol[filecache]
44
cffi
5-
pyobjc==8.5.1
5+
pyobjc==11.0
6+
py2app
67
requests
78
six

plotdevice/gfx/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from plotdevice import DeviceError
1212
from ..util import _copy_attrs, autorelease
13-
from ..util.readers import HTTP, last_modified
13+
from ..util.readers import get_http_session, last_modified
1414
from ..lib.io import MovieExportSession, ImageExportSession
1515
from .geometry import Region, Size, Point, Transform, CENTER
1616
from .atoms import TransformMixin, EffectsMixin, FrameMixin, Grob
@@ -123,7 +123,7 @@ def _lazyload(self, path=None, data=None):
123123
if re.match(r'https?:', path):
124124
# load from url
125125
key = err_info = path
126-
resp = HTTP.get(path)
126+
resp = get_http_session().get(path)
127127
mtime = last_modified(resp)
128128
# return a cached image if possible...
129129
if path in _cache and _cache[path][1] >= mtime:

plotdevice/gui/editor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
import os
33
import re
44
import json
5-
import cgi
65
import objc
76
from io import open
87
from objc import super
9-
from pprint import pprint
108
from time import time
11-
from bisect import bisect
129
from ..lib.cocoa import *
1310
from plotdevice.gui.preferences import get_default, editor_info
1411
from plotdevice.gui import bundle_path, set_timeout

plotdevice/run/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
try:
66
# test the sys.path by attempting to load a PyObjC submodule...
77
from Foundation import *
8+
import objc
89
except ImportError:
910
# detect whether we're being run from the repository and set up a local env if so
1011
repo = abspath(join(dirname(__file__), '../..'))
@@ -17,6 +18,7 @@
1718
call([sys.executable, setup_py, 'dev'])
1819
site.addsitedir(local_libs)
1920
from Foundation import *
21+
import objc
2022
else:
2123
from pprint import pformat
2224
missing = "Searched for PyObjC libraries in:\n%s\nto no avail..."%pformat(sys.path)
@@ -28,4 +30,4 @@
2830
# expose the script-runner object
2931
from .sandbox import Sandbox
3032

31-
__all__ = ('objc', 'encoding', 'Sandbox')
33+
__all__ = ('objc', 'encoded', 'Sandbox')

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,10 @@ def codesign(root, name=None, exec=False, entitlement=False):
506506
install_requires = [
507507
'requests',
508508
'cachecontrol[filecache]',
509-
'pyobjc-core==8.5.1',
510-
'pyobjc-framework-Quartz==8.5.1',
511-
'pyobjc-framework-LaunchServices==8.5.1',
512-
'pyobjc-framework-WebKit==8.5.1',
509+
'pyobjc-core==11.0',
510+
'pyobjc-framework-Quartz==11.0',
511+
'pyobjc-framework-LaunchServices==11.0',
512+
'pyobjc-framework-WebKit==11.0',
513513
],
514514
scripts = ["app/plotdevice"],
515515
zip_safe=False,

tests/compositing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ def test_beginclip(self):
111111

112112
def suite():
113113
suite = unittest.TestSuite()
114-
suite.addTest(unittest.makeSuite(CompositingTests))
114+
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CompositingTests))
115115
return suite

tests/drawing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,5 +479,5 @@ def test_strokewidth(self):
479479

480480
def suite():
481481
suite = unittest.TestSuite()
482-
suite.addTest(unittest.makeSuite(DrawingTests))
482+
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(DrawingTests))
483483
return suite

0 commit comments

Comments
 (0)