Skip to content

Commit 8b215f4

Browse files
authored
Merge pull request #37 from hANSIc99/dev
v1.1 ready
2 parents 8aca485 + 5d129b3 commit 8b215f4

File tree

13 files changed

+60
-33
lines changed

13 files changed

+60
-33
lines changed

CHANGES.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
1.1
2+
PythonicDaemon: Bug in execution_operator fixed (reloading modules)
3+
PythonicDaemon: Bug in GenericPython template fixed (wrong name of queue)
4+
5+
6+
7+
######################################################################
8+
9+
110
0.18
211

312
PythonicDaemon: tty bug fixed: can be run as cronjob now

Containerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Full multi-processing and multi-threading capable.
1010
#
1111
#
12-
#CreationDate: 24.12.2020
12+
#CreationDate: 17.03.2021
1313
#Creator: Stephan Avenwedde
1414
#
1515
#
@@ -57,10 +57,8 @@ RUN dnf -y install pip
5757
# #
5858
###################################
5959

60-
6160
RUN /usr/bin/python3 -m pip install supervisor==4.2.1
6261

63-
6462

6563
###################################
6664
# #
@@ -95,10 +93,11 @@ RUN rm /ms-python.vscode-pylance-2020.12.2.vsix
9593
RUN /usr/bin/python3 -m pip install eventlet==0.30.0
9694
RUN /usr/bin/python3 -m pip install PySide2==5.12.2
9795

98-
COPY dist/Pythonic-1.0.tar.gz /
96+
COPY dist/Pythonic-1.1.tar.gz /
9997

100-
RUN /usr/bin/python3 -m pip install /Pythonic-1.0.tar.gz
98+
RUN /usr/bin/python3 -m pip install /Pythonic-1.1.tar.gz
10199

100+
RUN rm Pythonic-1.1.tar.gz
102101

103102
###################################
104103
# #
@@ -107,9 +106,8 @@ RUN /usr/bin/python3 -m pip install /Pythonic-1.0.tar.gz
107106
###################################
108107

109108
COPY src/code-server/config.yaml /root/.config/code-server/
110-
COPY src/supervisor/supervisord.conf /etc/
111-
109+
COPY src/supervisor/supervisord.conf /etc/supervisord.conf
112110

113-
ENTRYPOINT ["/usr/local/bin/supervisord -c /etc/supervisord.conf"]
114-
WORKDIR /root
115111

112+
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
113+
WORKDIR /root

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ src/Pythonic/build.sh
77
# BUILD PIP PACKAGE
88
python3 setup.py sdist
99

10+
# DOWNLOAD CODE SERVER EXTENSIONS
11+
src/code-server
12+
1013
# BUILD CONTAINER IMAGE
11-
podman build -t pythonic:0.1 .
14+
podman build -t pythonic:1.1 .

dist/Pythonic-1.1.tar.gz

5.02 MB
Binary file not shown.

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name = 'Pythonic',
8-
version = '1.0',
8+
version = '1.01',
99
author = 'Stephan Avenwedde',
1010
author_email = '[email protected]',
1111
license = 'GPLv3',
@@ -21,10 +21,10 @@
2121
'public_html/static/python.ico',
2222
'public_html/static/qtlogo.svg',
2323
'public_html/static/qtloader.js',
24-
'public_html/static/PythonicWeb.js',
25-
'public_html/static/PythonicWeb.wasm',
26-
'public_html/static/PythonicWeb.data',
27-
'public_html/templates/PythonicWeb.html',
24+
'public_html/static/*.js',
25+
'public_html/static/*.wasm',
26+
'public_html/static/*.data',
27+
'public_html/templates/*.html',
2828
'public_html/config/Toolbox/Basic/GenericPython.json',
2929
'public_html/config/Toolbox/Basic/GenericPython.editor',
3030
'public_html/config/Toolbox/Basic/Scheduler.json',

src/Pythonic/PythonicWeb.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ QT += core gui websockets
33
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
44

55

6+
#TARGET="PythonicWeb_1.1"
67
CONFIG += c++11
7-
#CONFIG += wasm
8+
CONFIG += wasm
89

910
wasm {
1011
DEFINES += WASM

src/Pythonic/build.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ source ~/Dokumente/emsdk/emsdk_env.sh # Version 1.39.8
88
#make clean
99
make
1010

11-
cp PythonicWeb.html public_html/static/
12-
cp qtloader.js public_html/static/
13-
cp PythonicWeb.wasm public_html/static/
14-
cp PythonicWeb.js public_html/static/
15-
cp PythonicWeb.data public_html/static/
11+
cp *.html public_html/static/
12+
cp *.wasm public_html/static/
13+
cp *.js public_html/static/
14+
cp *.data public_html/static/

src/Pythonic/executables/generic_python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def execute(self):
3434
####################################################
3535

3636
#recordDone = Record(cnt, 'Sending value of cnt: {}'.format(cnt))
37-
#self.queue.put(recordDone)
37+
#self.return_queue.put(recordDone)
3838
#return
3939

4040

src/Pythonic/execution_operator.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import random
55
import multiprocessing as mp
66
import threading as mt
7+
from importlib import reload
78
from pathlib import Path
89
from PySide2.QtCore import QCoreApplication, QObject, QThread, Qt, QTimer
910
from PySide2.QtCore import Signal
@@ -57,13 +58,17 @@ def run(self):
5758

5859
try:
5960

60-
#executable = str(Path.home() / 'Pythonic' / 'executables' / ) + '.py'
61-
#elementCls = getattr(__import__('executables.' + self.element['Filename'], fromlist=['Element']), 'Element')
62-
elementCls = getattr(__import__(self.element['Filename'], fromlist=['Element']), 'Element')
63-
#logging.debug('ProcessHandler::run() - loading file - id: 0x{:08x}, ident: {:04d} - {}'.format(
64-
# self.element['Id'], self.identifier, self.element['Filename']))
61+
# This affects only first invocation
62+
module = __import__(self.element['Filename'])
63+
#logging.warning("Load module first time")
64+
65+
# Reload to execute possible changes
66+
module = reload(module)
67+
68+
elementCls = getattr(module, 'Element')
69+
6570
except Exception as e:
66-
logging.debug('ProcessHandler::run() - Error loading file - id: 0x{:08x}, ident: {:04d} - {} Error: {}'.format(
71+
logging.warning('ProcessHandler::run() - Error loading file - id: 0x{:08x}, ident: {:04d} - {} Error: {}'.format(
6772
self.element['Id'], self.identifier, self.element['Filename'], e))
6873
return
6974

src/Pythonic/screen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def reset_screen():
1010
'|_| \__, |\__|_| |_|\___/|_| |_|_|\___|____/ \__,_|\___|_| |_| |_|\___/|_| |_|\n'\
1111
' |___/ \n'
1212

13-
version = 'v1.0\n'
13+
version = 'v1.1\n'
1414
gitHub = 'Visit https://github.com/hANSIc99/Pythonic\n'
1515
log_info_msg = '<<<<<<<<<<<< Logging directory ~/Pythonic/log/\n'
1616

src/code-server/download.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
#!/bin/sh
2+
cd "${0%/*}"
3+
4+
5+
if [ -f "code-server-3.8.0-amd64.rpm" ]; then
6+
echo "code-server-3.8.0-amd64.rpm exists."
7+
else
8+
echo "Download code-server-3.8.0-amd64.rpm"
9+
curl -LJ0 https://github.com/cdr/code-server/releases/download/v3.8.0/code-server-3.8.0-amd64.rpm -o code-server-3.8.0-amd64.rpm
10+
fi
11+
12+
13+
214

3-
#FILE=/etc/resolv.conf
415

516
if [ -f "ms-python-release.vsix" ]; then
617
echo "ms-python-release.vsix exists."
@@ -9,11 +20,13 @@ else
920
curl -LJ0 https://github.com/microsoft/vscode-python/releases/download/2020.10.332292344/ms-python-release.vsix -o ms-python-release.vsix
1021
fi
1122

23+
24+
1225
if [ -f "ms-python.vscode-pylance-2020.12.2.vsix" ]; then
1326
echo "ms-python.vscode-pylance-2020.12.2.vsix exists."
1427
else
1528
echo "Download ms-python.vscode-pylance-2020.12.2.vsix"
16-
curl -LJ0 https://www.vsixhub.com/go.php?post_id=32420&s=publish&link=https%3A%2F%2Ff.vsixhub.com%2Ffile.php%3Fpost_id%3D32420%26app_id%3D364d2426-116a-433a-a5d8-a5098dc3afbd%26version%3D2020.12.2%26ext_name%3Dvscode-pylance -o ms-python.vscode-pylance-2020.12.2.vsix
29+
curl -LJ0 "https://www.vsixhub.com/go.php?post_id=32420&s=publish&link=https%3A%2F%2Ff.vsixhub.com%2Ffile.php%3Fpost_id%3D32420%26app_id%3D364d2426-116a-433a-a5d8-a5098dc3afbd%26version%3D2020.12.2%26ext_name%3Dvscode-pylance" -o ms-python.vscode-pylance-2020.12.2.vsix
1730
fi
1831

1932

src/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
podman run -d --name Pythonic -p 7000:7000 -p 8000:8000 pythonic:0.1
3+
podman run -d --name Pythonic -p 7000:7000 -p 8000:8000 pythonic:1.1

src/supervisor/supervisord.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
1717
[program:pythonic]
1818
command=/usr/local/bin/Pythonic
1919
user=root
20-
stdout_logfile=None
2120
stderr_logfile_maxbytes=50MB
2221
stderr_logfile_backups=10
2322
stderr_logfile=/var/log/pythonic-stderr.log

0 commit comments

Comments
 (0)