coretk - updated pipfile to install as editable, added convenient run script, updated images to load assuming local path
This commit is contained in:
parent
00a37cbb6f
commit
8682f01fdc
5 changed files with 28 additions and 7 deletions
|
@ -3,10 +3,13 @@ name = "pypi"
|
||||||
url = "https://pypi.org/simple"
|
url = "https://pypi.org/simple"
|
||||||
verify_ssl = true
|
verify_ssl = true
|
||||||
|
|
||||||
|
[scripts]
|
||||||
|
coretk = "python coretk/app.py"
|
||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
flake8 = "*"
|
flake8 = "*"
|
||||||
isort = "*"
|
isort = "*"
|
||||||
black = "==19.3b0"
|
black = "==19.3b0"
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
pillow = "*"
|
coretk = {editable = true,path = "."}
|
||||||
|
|
11
coretk/Pipfile.lock
generated
11
coretk/Pipfile.lock
generated
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "c719ca1ace4a33dfe01fe579162d4557e8711819c4e7b4f8e799dd25b9cde596"
|
"sha256": "f5abf95b09f7c7431b5d2143b43b6873cf9cf7d90dfb2eaad08d2446368a0a05"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {},
|
||||||
"python_version": "3.7"
|
|
||||||
},
|
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"name": "pypi",
|
"name": "pypi",
|
||||||
|
@ -16,6 +14,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
|
"coretk": {
|
||||||
|
"editable": true,
|
||||||
|
"path": "."
|
||||||
|
},
|
||||||
"pillow": {
|
"pillow": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:0804f77cb1e9b6dbd37601cee11283bba39a8d44b9ddb053400c58e0c0d7d9de",
|
"sha256:0804f77cb1e9b6dbd37601cee11283bba39a8d44b9ddb053400c58e0c0d7d9de",
|
||||||
|
@ -45,7 +47,6 @@
|
||||||
"sha256:ef6be704ae2bc8ad0ebc5cb850ee9139493b0fc4e81abcc240fb392a63ebc808",
|
"sha256:ef6be704ae2bc8ad0ebc5cb850ee9139493b0fc4e81abcc240fb392a63ebc808",
|
||||||
"sha256:f8dc19d92896558f9c4317ee365729ead9d7bbcf2052a9a19a3ef17abbb8ac5b"
|
"sha256:f8dc19d92896558f9c4317ee365729ead9d7bbcf2052a9a19a3ef17abbb8ac5b"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
|
||||||
"version": "==6.1.0"
|
"version": "==6.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,6 @@ class Application(tk.Frame):
|
||||||
def setup_app(self):
|
def setup_app(self):
|
||||||
self.master.title("CORE")
|
self.master.title("CORE")
|
||||||
self.master.geometry("800x600")
|
self.master.geometry("800x600")
|
||||||
self.master.state("zoomed")
|
|
||||||
image = Images.get("core")
|
image = Images.get("core")
|
||||||
self.master.tk.call("wm", "iconphoto", self.master._w, image)
|
self.master.tk.call("wm", "iconphoto", self.master._w, image)
|
||||||
self.pack(fill=tk.BOTH, expand=True)
|
self.pack(fill=tk.BOTH, expand=True)
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
|
import os
|
||||||
from PIL import Image, ImageTk
|
from PIL import Image, ImageTk
|
||||||
|
|
||||||
|
PATH = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
class Images:
|
class Images:
|
||||||
images = {}
|
images = {}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load(cls, name, file_path):
|
def load(cls, name, file_path):
|
||||||
|
file_path = os.path.join(PATH, file_path)
|
||||||
image = Image.open(file_path)
|
image = Image.open(file_path)
|
||||||
tk_image = ImageTk.PhotoImage(image)
|
tk_image = ImageTk.PhotoImage(image)
|
||||||
cls.images[name] = tk_image
|
cls.images[name] = tk_image
|
||||||
|
|
14
coretk/setup.py
Normal file
14
coretk/setup.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="coretk",
|
||||||
|
version="0.1.0",
|
||||||
|
packages=find_packages(),
|
||||||
|
install_requires=[
|
||||||
|
"pillow",
|
||||||
|
],
|
||||||
|
description="CORE GUI",
|
||||||
|
url="https://github.com/coreemu/core",
|
||||||
|
author="Boeing Research & Technology",
|
||||||
|
license="BSD",
|
||||||
|
)
|
Loading…
Add table
Reference in a new issue