Skip to content
Open
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
10 changes: 3 additions & 7 deletions calculator/.gitignore → .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ lib64/
parts/
sdist/
var/
*.dist-info/
*.egg-info/
.installed.cfg
*.egg
Expand All @@ -57,10 +58,5 @@ var/
## mpeltonen/sbt-idea plugin
.idea_modules/

# Briefcase build directories
iOS/
macOS/
windows/
android/
linux/
django/
# Briefcase log files
logs/
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 0 additions & 49 deletions calculator/pyproject.toml

This file was deleted.

1 change: 0 additions & 1 deletion calculator/src/calculator.dist-info/INSTALLER

This file was deleted.

10 changes: 0 additions & 10 deletions calculator/src/calculator.dist-info/METADATA

This file was deleted.

149 changes: 149 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
[tool.briefcase]
project_name = "Calculator"
bundle = "com.abirshandilya.calculator"
version = "0.0.1"
url = "https://abirshandilya.com/calculator"
license = "BSD license"
author = 'Abir Shandilya'
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',]
test_sources = [
"tests",
]
requires = []
test_requires = [
"pytest",
]


[tool.briefcase.app.calculator.macOS]
requires = [
"toga-cocoa~=0.4.8",
"std-nslog~=1.0.0"
]

[tool.briefcase.app.calculator.linux]
requires = [
"toga-gtk~=0.4.8",
]

[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 = [
# 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.4.8",
]

# Mobile deployments
[tool.briefcase.app.calculator.iOS]
requires = [
"toga-iOS~=0.4.8",
"std-nslog~=1.0.0"
]

[tool.briefcase.app.calculator.android]
requires = [
"toga-android~=0.4.8"
]

# Web deployments
[tool.briefcase.app.calculator.web]
requires = [
"toga-web~=0.4.8",
]
style_framework = "Shoelace v2.3"
File renamed without changes.
2 changes: 2 additions & 0 deletions calculator/src/calculator/app.py → src/calculator/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Empty file.