q2rad 0.1.181__py3-none-any.whl → 0.1.183__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of q2rad might be problematic. Click here for more details.

q2rad/q2make.py CHANGED
@@ -15,6 +15,7 @@
15
15
  import os
16
16
  import sys
17
17
  import shutil
18
+ import zipfile
18
19
  from q2terminal.q2terminal import Q2Terminal
19
20
  from q2rad.q2utils import q2cursor, Q2Form, open_folder # noqa F401
20
21
  from q2gui.q2dialogs import q2mess, q2wait, q2ask
@@ -69,7 +70,7 @@ def make_binary(self):
69
70
  if not form.ok_pressed:
70
71
  return
71
72
 
72
- if q2ask("Уou are about to start buiding binary executable file of Q2RAD!<br>Are You Sure?") != 2:
73
+ if q2ask("Уou are about to start building binary executable file of Q2RAD!<br>Are You Sure?") != 2:
73
74
  return
74
75
 
75
76
  make_folder = os.path.abspath(form.s.make_folder)
@@ -81,7 +82,16 @@ def make_binary(self):
81
82
  if not os.path.isdir(make_folder):
82
83
  return
83
84
 
84
- main = "from q2rad.q2rad import Q2RadApp;app = Q2RadApp();app.run()"
85
+ main = """
86
+ if "darwin" in sys.platform:
87
+ path = sys.argv[0].split("/Contents/MacOS")[0]
88
+ path = os.path.dirname(path)
89
+ os.chdir(path)
90
+
91
+ from q2rad.q2rad import Q2RadApp
92
+ app = Q2RadApp()
93
+ app.run()
94
+ """
85
95
  open(f"{make_folder}/{binary_name}.py", "w").write(main)
86
96
 
87
97
  dist_folder = os.path.abspath(f"{make_folder}/dist/{binary_name}")
@@ -89,6 +99,8 @@ def make_binary(self):
89
99
  terminal = Q2Terminal(callback=print)
90
100
  # pynstaller_executable = os.path.dirname(sys.executable) + "/pyinstaller"
91
101
  pynstaller_executable = f"'{sys.executable}' -m PyInstaller"
102
+ if "win32" in sys.platform:
103
+ pynstaller_executable = "&" + pynstaller_executable
92
104
 
93
105
  if not os.path.isfile("poetry.lock"):
94
106
  terminal.run(f"{pynstaller_executable} -v")
@@ -128,6 +140,24 @@ def make_binary(self):
128
140
  # if os.path.isfile(os.path.join(dist_folder, x)):
129
141
  # shutil.move(os.path.join(dist_folder, x), os.path.join(dist_folder, binary_name, x))
130
142
 
143
+ if "darwin" in sys.platform:
144
+ shutil.move(
145
+ f"{make_folder}/dist/{binary_name}.app", f"{make_folder}/dist/{binary_name}/{binary_name}.app"
146
+ )
147
+ os.remove(f"{make_folder}/dist/{binary_name}/{binary_name}")
148
+ shutil.rmtree(f"{make_folder}/dist/{binary_name}/_internal", ignore_errors=True)
149
+
150
+ name = f"{make_folder}/dist/{binary_name}"
151
+ zip_name = name + ".zip"
152
+
153
+ with zipfile.ZipFile(zip_name, "w", zipfile.ZIP_DEFLATED) as zip_ref:
154
+ for folder_name, subfolders, filenames in os.walk(name):
155
+ for filename in filenames:
156
+ file_path = os.path.join(folder_name, filename)
157
+ zip_ref.write(file_path, arcname=f"{binary_name}/{os.path.relpath(file_path, name)}")
158
+
159
+ zip_ref.close()
160
+
131
161
  w.close()
132
162
 
133
163
  if terminal.exit_code != 0:
q2rad/q2packages.py CHANGED
@@ -40,9 +40,9 @@ class Q2Packages(Q2Form):
40
40
  self.set_model(model)
41
41
  self.add_action("/crud")
42
42
  # self.add_action("Imp", self.imp)
43
- self.add_action("Install", self.install)
44
- self.add_action("Uninstall", self.uninstall)
45
- self.add_action("Versions", self.info)
43
+ self.add_action("Install", self.install, eof_disabled=True)
44
+ self.add_action("Uninstall", self.uninstall, eof_disabled=True)
45
+ self.add_action("Versions", self.info, eof_disabled=True)
46
46
 
47
47
  # def imp(self):
48
48
  # __import__(self.r.package_name)
q2rad/q2utils.py CHANGED
@@ -203,7 +203,10 @@ class Q2Form(_Q2Form):
203
203
  )
204
204
 
205
205
  def changelog(self):
206
- choice = q2ask("Что смотрим?", buttons=["Cancel", "Current row", "All rows"])
206
+ choice = q2ask(
207
+ "Select viewing mode for changelog: only current row or all rows?",
208
+ buttons=["Cancel", "Current row", "All rows"],
209
+ )
207
210
  if choice < 2: # Cancel
208
211
  return
209
212
  elif choice == 2: # Row
@@ -507,10 +510,10 @@ class auto_filter:
507
510
  self.mem.add_control("/h", cu.r.label, check=1)
508
511
  col["label"] = "from"
509
512
  co = col["column"]
510
- col["column"] = co + "1"
513
+ col["column"] = co + "____1"
511
514
  self.mem.add_control(**col)
512
515
  col["label"] = "to"
513
- col["column"] = co + "2"
516
+ col["column"] = co + "____2"
514
517
  self.mem.add_control(**col)
515
518
  self.mem.add_control("/s")
516
519
  self.mem.add_control("/")
@@ -534,8 +537,8 @@ class auto_filter:
534
537
  if control1 is None:
535
538
  if column in mem_widgets:
536
539
  control1 = column
537
- elif column + "1" in mem_widgets:
538
- control1 = column + "1"
540
+ elif column + "____1" in mem_widgets:
541
+ control1 = column + "____1"
539
542
  if control1 not in mem_widgets:
540
543
  return ""
541
544
 
@@ -546,8 +549,8 @@ class auto_filter:
546
549
  num_control = self.mem.controls.c.__getattr__(control1).get("num")
547
550
  control1_value = self.mem.s.__getattr__(control1)
548
551
  if control2 is None:
549
- if control1.endswith("1"):
550
- control2 = control1[:-1] + "2"
552
+ if control1.endswith("____1"):
553
+ control2 = control1[:-5] + "____2"
551
554
  control2_value = self.mem.s.__getattr__(control2)
552
555
  else:
553
556
  control2_value = None
q2rad/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.181"
1
+ __version__ = "0.1.183"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.181
3
+ Version: 0.1.183
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -6,19 +6,19 @@ q2rad/q2appselector.py,sha256=oKlBdGPaCh0HEeDNJRMtGMVYGev2Ylundqum74NtPqY,12238
6
6
  q2rad/q2constants.py,sha256=dQtN4OMvZw0FATDAFYjolI7eGMVUnNnbTl6qM-ggZ4I,3416
7
7
  q2rad/q2forms.py,sha256=A5VeBK8OdE3zn0L1TgvCk4OjpB1nLibJqBFfpVZr_Uc,10181
8
8
  q2rad/q2lines.py,sha256=e2GwnXxGhxMw_xWF_-enmYeHaMSKRnxER1jGFgRlOAc,14481
9
- q2rad/q2make.py,sha256=UdrmyGngzVD5Ix9mBqb8SPmZ2tOYghQ9Tv69lg-LjOs,5514
9
+ q2rad/q2make.py,sha256=SjHgHMczkmjAURUoGxRf37tV4kO8NE2f_vAvPzBjC6s,6568
10
10
  q2rad/q2market.py,sha256=koWwKKc1MVn0ud2XDu_dal8lBFEMLX8KABpZO_OzTIM,2597
11
11
  q2rad/q2modules.py,sha256=N3OkUKfiwVZtmDyAtnJcs2Rprd7uIHd0HhjHTyFoN_s,4294
12
- q2rad/q2packages.py,sha256=IpWEcAT9nLCHUGViInEyM4T1cLEwK9GtNcdGF-pk0tw,3345
12
+ q2rad/q2packages.py,sha256=-JrBRyyjGNsckcQfkqihRY-SZWUbVnsieBNKM6DJngk,3402
13
13
  q2rad/q2queries.py,sha256=ABbr66YRLmleo2wcpvwcQwSPt_htjQsYXgoCqRRQSbo,12512
14
14
  q2rad/q2rad.py,sha256=yf-W0YHQcCI5BNqzfKmTLzMOIgybk7fauR9-dsIn_Ps,42942
15
15
  q2rad/q2raddb.py,sha256=ISqT5EBFO7eaXcQRNpA0hMiRU84kbd-FcfckwKMlGfs,4506
16
16
  q2rad/q2reports.py,sha256=xciOPsSbhepcKk_q2bIHsceAyg5ZMbs-EVbzyD8sqBI,81212
17
17
  q2rad/q2stylesettings.py,sha256=esbfQoPgP7lJN2GRkqeQKjDpHCqCilJBzZf-c73ThCU,3593
18
- q2rad/q2utils.py,sha256=GOc7Ymf3EKi1ANHmXKNPsufYu5HkXysq4LaYjZh71GI,18400
19
- q2rad/version.py,sha256=ZdxQFgfwMgcLstS2tHqv93Tm2T7lXzvvmJLNB0GKS_c,23
20
- q2rad-0.1.181.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
21
- q2rad-0.1.181.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
22
- q2rad-0.1.181.dist-info/METADATA,sha256=1zFouimq6c1GfVVlpk3rCz8KW0unqAPPf16XHXg-Kf0,3329
23
- q2rad-0.1.181.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
24
- q2rad-0.1.181.dist-info/RECORD,,
18
+ q2rad/q2utils.py,sha256=YKmHbfvKqGqhVjOERdceK2lT9IShj0afwZkGTObCs-I,18504
19
+ q2rad/version.py,sha256=262HoV_V3P5Q9BFxC-7XwuMUEj7KKuFEc7fj0QupKz0,23
20
+ q2rad-0.1.183.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
21
+ q2rad-0.1.183.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
22
+ q2rad-0.1.183.dist-info/METADATA,sha256=BUEIR4kPD58ZahimzSNNj0GDo-lrb-f8BClCqukaem0,3329
23
+ q2rad-0.1.183.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
24
+ q2rad-0.1.183.dist-info/RECORD,,