Skip to content

Commit ef3445d

Browse files
Add fake pyb on windows, create installer v1.0-rc2
Signed-off-by: Martin Ribelotta <martinribelotta@gmail.com>
1 parent 80ff443 commit ef3445d

File tree

8 files changed

+28
-12
lines changed

8 files changed

+28
-12
lines changed

mk_install.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
; HM NIS Edit Wizard helper defines
44
!define PRODUCT_NAME "uPyIDE"
5-
!define PRODUCT_VERSION "1.0-rc1"
5+
!define PRODUCT_VERSION "1.0-rc2"
66
!define PRODUCT_PUBLISHER "None"
77
!define PRODUCT_WEB_SITE "https://github.com/martinribelotta/uPyIDE"
88
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\EjecutablePrincipal.exe"
File renamed without changes.

share/uPyIDE/help.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h1 {
2+
color: blue;
3+
}

share/uPyIDE/help.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<html>
2+
<body>
3+
<h1>uPyIDE Help</h1>
4+
<ul>
5+
<li>TODO</li>
6+
</ul>
7+
</body>
8+
</html>

share/uPyIDE/help.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*** uPyIDE ***
2+
3+
- TODO

share/uPyIDE/images/about.png

5.6 KB
Loading

src/server.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import argparse
2121
import logging
2222
import sys
23-
import inspect
23+
2424

2525
if __name__ == '__main__':
2626
"""
@@ -37,17 +37,12 @@
3737
# add user paths to sys.path
3838
if args.syspath:
3939
for path in args.syspath:
40-
print('append path %s to sys.path' % path)
40+
print(('append path %s to sys.path' % path))
4141
sys.path.append(path)
4242

4343
from pyqode.core import backend
4444
from pyqode.python.backend.workers import JediCompletionProvider
4545

46-
try:
47-
import pyb as fake_pyb
48-
sys.path.append(inspect.getfile(fake_pyb))
49-
except:
50-
pass
5146
# setup completion providers
5247
backend.CodeCompletionWorker.providers.append(JediCompletionProvider())
5348
backend.CodeCompletionWorker.providers.append(

src/uPyIDE.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import re
55
import sys
6-
import base64
76
import glob
87
import collections
98

@@ -43,6 +42,10 @@ def share():
4342
'..', 'share', 'uPyIDE'))
4443

4544

45+
def fakelibs():
46+
return os.path.join(share(), 'fakelibs')
47+
48+
4649
def icon(name):
4750
path = os.path.join(share(), 'images', '{}.png'.format(name))
4851
return QtGui.QIcon(path)
@@ -255,9 +258,13 @@ def closeEvent(self, event):
255258
if event.isAccepted():
256259
self.terminate()
257260

261+
def createEditor(self):
262+
return widgets.PyCodeEdit(interpreter=backend_interpreter(),
263+
server_script=completion_server(),
264+
args=['-s', fakelibs()])
265+
258266
def fileNew(self):
259-
code_edit = widgets.PyCodeEdit(interpreter=backend_interpreter(),
260-
server_script=completion_server())
267+
code_edit = self.createEditor()
261268
i = self.tabber.add_code_edit(code_edit, i18n("NewFile.py (%d)"))
262269
self.tabber.setCurrentIndex(i)
263270

@@ -287,7 +294,7 @@ def fileOpen(self):
287294
self, i18n("Open File"), self.cwd,
288295
i18n("Python files (*.py);;All files (*)"))
289296
if name:
290-
code_edit = widgets.PyCodeEdit(server_script=server.__file__)
297+
code_edit = self.createEditor()
291298
code_edit.file.open(name)
292299
i = self.tabber.add_code_edit(code_edit)
293300
self.tabber.setCurrentIndex(i)

0 commit comments

Comments
 (0)