Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions PlotDevice.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@
INFOPLIST_FILE = app/info.plist;
INSTALL_PATH = /Applications;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../Frameworks/Python.framework";
MACOSX_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = io.plotdevice.PlotDevice;
Expand All @@ -625,6 +625,7 @@
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = dist;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -637,7 +638,7 @@
INFOPLIST_FILE = app/info.plist;
INSTALL_PATH = /Applications;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../Frameworks/Python.framework";
MACOSX_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = io.plotdevice.PlotDevice;
PRODUCT_NAME = PlotDevice;
Expand Down
8 changes: 4 additions & 4 deletions app/python.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Generated by deps/frameworks/config.py
PYTHON_FRAMEWORK = $(PROJECT_DIR)/deps/frameworks/Python.framework
PYTHON = $(PYTHON_FRAMEWORK)/Versions/3.11/bin/python3
LIBRARY_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.11/lib/python3.11/config-3.11-darwin
HEADER_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.11/include/python3.11
OTHER_LDFLAGS = $(inherited) -lpython3.11
PYTHON = $(PYTHON_FRAMEWORK)/Versions/3.13/bin/python3
LIBRARY_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.13/lib/python3.13/config-3.13-darwin
HEADER_SEARCH_PATHS = $(inherited) $(PYTHON_FRAMEWORK)/Versions/3.13/include/python3.13
OTHER_LDFLAGS = $(inherited) -lpython3.13
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) PYTHON_BIN="$(PYTHON)" PY3K=1
3 changes: 2 additions & 1 deletion deps/frameworks/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PYTHON_VERSION = 3.11.9
PYTHON_VERSION = 3.13.3
FRAMEWORK_REPO = https://github.com/gregneagle/relocatable-python.git
BUILD_OPTS = --os-version=11 --python-version=$(PYTHON_VERSION) --upgrade-pip --pip-requirements=requirements.txt
BIN = ./Python.framework/Versions/Current/bin
Expand All @@ -11,6 +11,7 @@ PIP_INCLUDES = $(shell $(BIN)/python3-config --includes)

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

Python.framework: relocatable-python
PYTHONNOUSERSITE=1 $(PIP_ENV) python3 ./relocatable-python/make_relocatable_python_framework.py $(BUILD_OPTS)
Expand Down
3 changes: 2 additions & 1 deletion deps/frameworks/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xattr
cachecontrol[filecache]
cffi
pyobjc==8.5.1
pyobjc==11.0
py2app
requests
six
4 changes: 2 additions & 2 deletions plotdevice/gfx/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from plotdevice import DeviceError
from ..util import _copy_attrs, autorelease
from ..util.readers import HTTP, last_modified
from ..util.readers import get_http_session, last_modified
from ..lib.io import MovieExportSession, ImageExportSession
from .geometry import Region, Size, Point, Transform, CENTER
from .atoms import TransformMixin, EffectsMixin, FrameMixin, Grob
Expand Down Expand Up @@ -123,7 +123,7 @@ def _lazyload(self, path=None, data=None):
if re.match(r'https?:', path):
# load from url
key = err_info = path
resp = HTTP.get(path)
resp = get_http_session().get(path)
mtime = last_modified(resp)
# return a cached image if possible...
if path in _cache and _cache[path][1] >= mtime:
Expand Down
3 changes: 0 additions & 3 deletions plotdevice/gui/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
import os
import re
import json
import cgi
import objc
from io import open
from objc import super
from pprint import pprint
from time import time
from bisect import bisect
from ..lib.cocoa import *
from plotdevice.gui.preferences import get_default, editor_info
from plotdevice.gui import bundle_path, set_timeout
Expand Down
4 changes: 3 additions & 1 deletion plotdevice/run/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
try:
# test the sys.path by attempting to load a PyObjC submodule...
from Foundation import *
import objc
except ImportError:
# detect whether we're being run from the repository and set up a local env if so
repo = abspath(join(dirname(__file__), '../..'))
Expand All @@ -17,6 +18,7 @@
call([sys.executable, setup_py, 'dev'])
site.addsitedir(local_libs)
from Foundation import *
import objc
else:
from pprint import pformat
missing = "Searched for PyObjC libraries in:\n%s\nto no avail..."%pformat(sys.path)
Expand All @@ -28,4 +30,4 @@
# expose the script-runner object
from .sandbox import Sandbox

__all__ = ('objc', 'encoding', 'Sandbox')
__all__ = ('objc', 'encoded', 'Sandbox')
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,10 @@ def codesign(root, name=None, exec=False, entitlement=False):
install_requires = [
'requests',
'cachecontrol[filecache]',
'pyobjc-core==8.5.1',
'pyobjc-framework-Quartz==8.5.1',
'pyobjc-framework-LaunchServices==8.5.1',
'pyobjc-framework-WebKit==8.5.1',
'pyobjc-core==11.0',
'pyobjc-framework-Quartz==11.0',
'pyobjc-framework-LaunchServices==11.0',
'pyobjc-framework-WebKit==11.0',
],
scripts = ["app/plotdevice"],
zip_safe=False,
Expand Down
2 changes: 1 addition & 1 deletion tests/compositing.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@ def test_beginclip(self):

def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(CompositingTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CompositingTests))
return suite
2 changes: 1 addition & 1 deletion tests/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,5 +479,5 @@ def test_strokewidth(self):

def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(DrawingTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(DrawingTests))
return suite
2 changes: 1 addition & 1 deletion tests/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@ def test_push(self):

def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(GeometryTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(GeometryTests))
return suite
4 changes: 2 additions & 2 deletions tests/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def test_cli(self):


def suite():
from unittest import TestSuite, makeSuite
from unittest import TestSuite, defaultTestLoader

suite = TestSuite()
suite.addTest(makeSuite(ModuleTests))
suite.addTest(defaultTestLoader.loadTestsFromTestCase(ModuleTests))

return suite
2 changes: 1 addition & 1 deletion tests/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,5 @@ def test_star(self):

def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(PrimitivesTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(PrimitivesTests))
return suite
2 changes: 1 addition & 1 deletion tests/typography.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,5 @@ def test_line_fragment(self):

def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TypographyTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TypographyTests))
return suite