From 71aee6a6c2b7670b7102fa3b79e50752fa6eef7a Mon Sep 17 00:00:00 2001 From: tct123 <42028373+tct123@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:16:22 +0200 Subject: [PATCH 1/6] Update .gitignore --- calculator/.gitignore | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/calculator/.gitignore b/calculator/.gitignore index c02afb2..f6c30e2 100644 --- a/calculator/.gitignore +++ b/calculator/.gitignore @@ -44,6 +44,7 @@ lib64/ parts/ sdist/ var/ +*.dist-info/ *.egg-info/ .installed.cfg *.egg @@ -57,10 +58,5 @@ var/ ## mpeltonen/sbt-idea plugin .idea_modules/ -# Briefcase build directories -iOS/ -macOS/ -windows/ -android/ -linux/ -django/ +# Briefcase log files +logs/ From 4ef5e9028882429f78b2acaa74f76d758508cad7 Mon Sep 17 00:00:00 2001 From: tct123 <42028373+tct123@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:29:34 +0200 Subject: [PATCH 2/6] Update pyproject.toml --- calculator/pyproject.toml | 122 ++++++++++++++++++++++++++++++++++---- 1 file changed, 111 insertions(+), 11 deletions(-) diff --git a/calculator/pyproject.toml b/calculator/pyproject.toml index 5eae34c..456e5ed 100644 --- a/calculator/pyproject.toml +++ b/calculator/pyproject.toml @@ -10,40 +10,140 @@ author_email = "abirshandilya@gmail.com" [tool.briefcase.app.calculator] formal_name = "Calculator" description = "A basic calculator beeware application" +long_description = """More details about the app should go here. +""" icon = "src/calculator/resources/calculator" -sources = ['src/calculator'] +sources = ['src/calculator',] +test_sources = [ + "tests", +] requires = [] +test_requires = [ + "pytest", +] [tool.briefcase.app.calculator.macOS] requires = [ - 'toga-cocoa>=0.3.0.dev20', + "toga-cocoa~=0.3.1", + "std-nslog~=1.0.0" ] [tool.briefcase.app.calculator.linux] requires = [ - 'toga-gtk>=0.3.0.dev20', + "toga-gtk~=0.3.1", +] + +[tool.briefcase.app.calculator.linux.system.debian] +system_requires = [ + # Needed to compile pycairo wheel + "libcairo2-dev", + # Needed to compile PyGObject wheel + "libgirepository1.0-dev", +] + +system_runtime_requires = [ + # Needed to provide GTK + "libgtk-3-0", + # Needed to provide GI bindings to GTK + "libgirepository-1.0-1", + "gir1.2-gtk-3.0", + # Needed to provide WebKit2 at runtime + # "libwebkit2gtk-4.0-37", + # "gir1.2-webkit2-4.0", +] + +[tool.briefcase.app.calculator.linux.system.rhel] +system_requires = [ + # Needed to compile pycairo wheel + "cairo-gobject-devel", + # Needed to compile PyGObject wheel + "gobject-introspection-devel", +] + +system_runtime_requires = [ + # Needed to support Python bindings to GTK + "gobject-introspection", + # Needed to provide GTK + "gtk3", + # Needed to provide WebKit2 at runtime + # "webkit2gtk3", ] + +[tool.briefcase.app.calculator.linux.system.arch] +system_requires = [ + # Needed to compile pycairo wheel + "cairo", + # Needed to compile PyGObject wheel + "gobject-introspection", + # Runtime dependencies that need to exist so that the + # Arch package passes final validation. + # Needed to provide GTK + "gtk3", + # Dependencies that GTK looks for at runtime + "libcanberra", + # Needed to provide WebKit2 + # "webkit2gtk", +] + +system_runtime_requires = [ + # Needed to provide GTK + "gtk3", + # Needed to provide PyGObject bindings + "gobject-introspection-runtime", + # Dependencies that GTK looks for at runtime + "libcanberra", + # Needed to provide WebKit2 at runtime + # "webkit2gtk", +] + +[tool.briefcase.app.calculator.linux.appimage] +manylinux = "manylinux2014" + system_requires = [ - 'libgirepository1.0-dev', - 'libcairo2-dev', - 'libpango1.0-dev', - 'libwebkitgtk-3.0-0', - 'gir1.2-webkit-3.0', + # Needed to compile pycairo wheel + "cairo-gobject-devel", + # Needed to compile PyGObject wheel + "gobject-introspection-devel", + # Needed to provide GTK + "gtk3-devel", + # Dependencies that GTK looks for at runtime, that need to be + # in the build environment to be picked up by linuxdeploy + "libcanberra-gtk3", + "PackageKit-gtk3-module", + "gvfs-client", + # Needed to provide WebKit2 at runtime + # "webkit2gtk3", +] +linuxdeploy_plugins = [ + "DEPLOY_GTK_VERSION=3 gtk", ] +[tool.briefcase.app.calculator.linux.flatpak] +flatpak_runtime = "org.gnome.Platform" +flatpak_runtime_version = "44" +flatpak_sdk = "org.gnome.Sdk" + [tool.briefcase.app.calculator.windows] requires = [ - 'toga-winforms>=0.3.0.dev20', + "toga-winforms~=0.3.1", ] # Mobile deployments [tool.briefcase.app.calculator.iOS] requires = [ - 'toga-iOS>=0.3.0.dev20', + "toga-iOS~=0.3.1", + "std-nslog~=1.0.0" ] [tool.briefcase.app.calculator.android] requires = [ - 'toga-android>=0.3.0.dev20', + "toga-android~=0.3.1" +] + +# Web deployments +[tool.briefcase.app.calculator.web] +requires = [ + "toga-web~=0.3.1", ] +style_framework = "Shoelace v2.3" From f7e3cb7cf5f8adcd962deb5afd0b548cbb55b267 Mon Sep 17 00:00:00 2001 From: tct123 <42028373+tct123@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:31:51 +0200 Subject: [PATCH 3/6] Create CHANGELOG --- calculator/CHANGELOG | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 calculator/CHANGELOG diff --git a/calculator/CHANGELOG b/calculator/CHANGELOG new file mode 100644 index 0000000..e69de29 From 796b1ba846ff69e151cb6743e5ef87bf8fdadf5c Mon Sep 17 00:00:00 2001 From: tct123 <42028373+tct123@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:33:30 +0200 Subject: [PATCH 4/6] . --- calculator/.gitignore => .gitignore | 0 calculator/CHANGELOG => CHANGELOG | 0 calculator/LICENSE => LICENSE | 0 calculator/README.rst => README.rst | 0 calculator/src/calculator.dist-info/INSTALLER | 1 - calculator/src/calculator.dist-info/METADATA | 10 ---------- calculator/pyproject.toml => pyproject.toml | 0 {calculator/src => src}/calculator/__init__.py | 0 {calculator/src => src}/calculator/__main__.py | 0 {calculator/src => src}/calculator/app.py | 0 .../src => src}/calculator/resources/__init__.py | 0 .../calculator/resources/calculator.icns | Bin .../src => src}/calculator/resources/calculator.ico | Bin .../src => src}/calculator/resources/calculator.png | Bin 14 files changed, 11 deletions(-) rename calculator/.gitignore => .gitignore (100%) rename calculator/CHANGELOG => CHANGELOG (100%) rename calculator/LICENSE => LICENSE (100%) rename calculator/README.rst => README.rst (100%) delete mode 100644 calculator/src/calculator.dist-info/INSTALLER delete mode 100644 calculator/src/calculator.dist-info/METADATA rename calculator/pyproject.toml => pyproject.toml (100%) rename {calculator/src => src}/calculator/__init__.py (100%) rename {calculator/src => src}/calculator/__main__.py (100%) rename {calculator/src => src}/calculator/app.py (100%) rename {calculator/src => src}/calculator/resources/__init__.py (100%) rename {calculator/src => src}/calculator/resources/calculator.icns (100%) rename {calculator/src => src}/calculator/resources/calculator.ico (100%) rename {calculator/src => src}/calculator/resources/calculator.png (100%) diff --git a/calculator/.gitignore b/.gitignore similarity index 100% rename from calculator/.gitignore rename to .gitignore diff --git a/calculator/CHANGELOG b/CHANGELOG similarity index 100% rename from calculator/CHANGELOG rename to CHANGELOG diff --git a/calculator/LICENSE b/LICENSE similarity index 100% rename from calculator/LICENSE rename to LICENSE diff --git a/calculator/README.rst b/README.rst similarity index 100% rename from calculator/README.rst rename to README.rst diff --git a/calculator/src/calculator.dist-info/INSTALLER b/calculator/src/calculator.dist-info/INSTALLER deleted file mode 100644 index 0d8da94..0000000 --- a/calculator/src/calculator.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -briefcase diff --git a/calculator/src/calculator.dist-info/METADATA b/calculator/src/calculator.dist-info/METADATA deleted file mode 100644 index aafb757..0000000 --- a/calculator/src/calculator.dist-info/METADATA +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 2.1 -Briefcase-Version: 0.3.5 -Name: calculator -Formal-Name: Calculator -App-ID: com.abirshandilya.calculator.calculator -Version: 0.0.1 -Home-page: https://abirshandilya.com/calculator -Author: Abir Shandilya -Author-email: abirshandilya@gmail.com -Summary: A basic calculator beeware application diff --git a/calculator/pyproject.toml b/pyproject.toml similarity index 100% rename from calculator/pyproject.toml rename to pyproject.toml diff --git a/calculator/src/calculator/__init__.py b/src/calculator/__init__.py similarity index 100% rename from calculator/src/calculator/__init__.py rename to src/calculator/__init__.py diff --git a/calculator/src/calculator/__main__.py b/src/calculator/__main__.py similarity index 100% rename from calculator/src/calculator/__main__.py rename to src/calculator/__main__.py diff --git a/calculator/src/calculator/app.py b/src/calculator/app.py similarity index 100% rename from calculator/src/calculator/app.py rename to src/calculator/app.py diff --git a/calculator/src/calculator/resources/__init__.py b/src/calculator/resources/__init__.py similarity index 100% rename from calculator/src/calculator/resources/__init__.py rename to src/calculator/resources/__init__.py diff --git a/calculator/src/calculator/resources/calculator.icns b/src/calculator/resources/calculator.icns similarity index 100% rename from calculator/src/calculator/resources/calculator.icns rename to src/calculator/resources/calculator.icns diff --git a/calculator/src/calculator/resources/calculator.ico b/src/calculator/resources/calculator.ico similarity index 100% rename from calculator/src/calculator/resources/calculator.ico rename to src/calculator/resources/calculator.ico diff --git a/calculator/src/calculator/resources/calculator.png b/src/calculator/resources/calculator.png similarity index 100% rename from calculator/src/calculator/resources/calculator.png rename to src/calculator/resources/calculator.png From 271f41c6bdb3d6fef49bfafb8ad9730e804dc1df Mon Sep 17 00:00:00 2001 From: tct123 <42028373+tct123@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:34:23 +0200 Subject: [PATCH 5/6] Update app.py --- src/calculator/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calculator/app.py b/src/calculator/app.py index 2ef7d01..eaea97a 100644 --- a/src/calculator/app.py +++ b/src/calculator/app.py @@ -108,6 +108,8 @@ def enterdata(self,widget,number): def calculate(self,widget): output = eval(self.input_text.value) + if output == "": + output = "ERROR!" self.input_text.value = output def main(): return Calculator() From 0d2e3022c95caa0cd67e59320f7ebb1e0595f0a3 Mon Sep 17 00:00:00 2001 From: tct123 <42028373+tct123@users.noreply.github.com> Date: Thu, 28 Nov 2024 19:22:53 +0100 Subject: [PATCH 6/6] Update pyproject.toml --- pyproject.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 456e5ed..d13eb20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,13 +25,13 @@ test_requires = [ [tool.briefcase.app.calculator.macOS] requires = [ - "toga-cocoa~=0.3.1", + "toga-cocoa~=0.4.8", "std-nslog~=1.0.0" ] [tool.briefcase.app.calculator.linux] requires = [ - "toga-gtk~=0.3.1", + "toga-gtk~=0.4.8", ] [tool.briefcase.app.calculator.linux.system.debian] @@ -126,24 +126,24 @@ flatpak_sdk = "org.gnome.Sdk" [tool.briefcase.app.calculator.windows] requires = [ - "toga-winforms~=0.3.1", + "toga-winforms~=0.4.8", ] # Mobile deployments [tool.briefcase.app.calculator.iOS] requires = [ - "toga-iOS~=0.3.1", + "toga-iOS~=0.4.8", "std-nslog~=1.0.0" ] [tool.briefcase.app.calculator.android] requires = [ - "toga-android~=0.3.1" + "toga-android~=0.4.8" ] # Web deployments [tool.briefcase.app.calculator.web] requires = [ - "toga-web~=0.3.1", + "toga-web~=0.4.8", ] style_framework = "Shoelace v2.3"