q2rad 0.1.167__py3-none-any.whl → 0.1.168__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/q2appselector.py CHANGED
@@ -228,17 +228,17 @@ class Q2AppSelect(Q2Form):
228
228
  if self.q2_app.keyboard_modifiers() != "":
229
229
  return
230
230
  if self.db.table("applications").row_count() <= 0:
231
- if not os.path.isdir("q2rad_sqlite_databases"):
232
- os.mkdir("q2rad_sqlite_databases")
231
+ if not os.path.isdir("databases"):
232
+ os.mkdir("databases")
233
233
  insert(
234
234
  "applications",
235
235
  {
236
236
  "ordnum": 1,
237
237
  "name": "My first app",
238
238
  "driver_data": "Sqlite",
239
- "database_data": "q2rad_sqlite_databases/my_first_app_data_storage.sqlite",
239
+ "database_data": "databases/my_first_app_data_storage.sqlite",
240
240
  "driver_logic": "Sqlite",
241
- "database_logic": "q2rad_sqlite_databases/my_first_app_logic_storage.sqlite",
241
+ "database_logic": "databases/my_first_app_logic_storage.sqlite",
242
242
  "dev_mode": "*",
243
243
  },
244
244
  self.db,
q2rad/q2make.py CHANGED
@@ -25,7 +25,7 @@ from q2rad.q2appmanager import AppManager
25
25
 
26
26
 
27
27
  def create_q2apps_sqlite(dist_folder):
28
- database_folder_name = "database"
28
+ database_folder_name = "databases"
29
29
  database_name_prefix = "app1"
30
30
  appsel = Q2AppSelect(f"{dist_folder}/q2apps.sqlite")
31
31
  appsel.db.insert(
q2rad/q2rad.py CHANGED
@@ -613,18 +613,17 @@ class Q2RadApp(Q2App):
613
613
 
614
614
  if not self.frozen:
615
615
  # create update_q2rad.sh
616
- self.write_restore_file(
617
- "update_q2rad",
618
- ("" if "win32" in sys.platform else "#!/bin/bash\n")
619
- + ("q2rad\\scripts\\activate " if "win32" in sys.platform else "source q2rad/bin/activate")
620
- + "&& pip install --upgrade --force-reinstall q2gui"
621
- + "&& pip install --upgrade --force-reinstall q2db"
622
- + "&& pip install --upgrade --force-reinstall q2report"
623
- + "&& pip install --upgrade --force-reinstall q2terminal"
624
- + "&& pip install --upgrade --force-reinstall q2rad",
625
- )
616
+ self.write_reinstall_files()
626
617
 
627
618
  # create run_q2rad
619
+ self.write_run_files()
620
+ if sys.platform != "darwin":
621
+ if q2AskYN("Should I make a desktop shortcut?") == 2:
622
+ self.make_desktop_shortcut()
623
+ self.process_events()
624
+
625
+ def write_run_files(self):
626
+ if sys.prefix != sys.base_prefix: # in virtualenv
628
627
  self.write_restore_file(
629
628
  "run_q2rad",
630
629
  ("" if "win32" in sys.platform else "#!/bin/bash\n")
@@ -634,27 +633,56 @@ class Q2RadApp(Q2App):
634
633
  else "q2rad/bin/q2rad\n"
635
634
  ),
636
635
  )
637
- if "win32" in sys.platform:
638
- open("run_q2rad.vbs", "w").write(
639
- 'WScript.CreateObject("WScript.Shell").Run '
640
- '"q2rad\\scripts\\pythonw.exe -m q2rad", 0, false'
641
- )
636
+ elif os.path.isdir("python.loc"):
637
+ self.write_restore_file(
638
+ "run_q2rad",
639
+ ("" if "win32" in sys.platform else "#!/bin/bash\n")
640
+ + ("python.loc\\scripts\\q2rad" if "win32" in sys.platform else "python.loc/bin/q2rad\n"),
641
+ )
642
+ else:
643
+ self.write_restore_file(
644
+ "run_q2rad",
645
+ ("" if "win32" in sys.platform else "#!/bin/bash\n")
646
+ + ("pythonw.exe -m q2rad" if "win32" in sys.platform else "python -m q2rad\n"),
647
+ )
642
648
 
643
- open("make_shortcut.vbs", "w").write(
644
- 'Set oWS = WScript.CreateObject("WScript.Shell")\n'
645
- 'Set oLink = oWS.CreateShortcut(oWS.SpecialFolders("Desktop") & "\\q2RAD.lnk")\n'
646
- 'cu = WScript.CreateObject("Scripting.FileSystemObject").'
647
- "GetParentFolderName(WScript.ScriptFullName)\n"
648
- 'oLink.TargetPath = cu & "\\run_q2rad.vbs"\n'
649
- 'oLink.WorkingDirectory = cu & ""\n'
650
- 'oLink.Description = "q2RAD"\n'
651
- 'oLink.IconLocation = cu & "\\assets\\q2rad.ico"\n'
652
- "oLink.Save\n"
653
- )
654
- if sys.platform != "darwin":
655
- if q2AskYN("Should I make a desktop shortcut?") == 2:
656
- self.make_desktop_shortcut()
657
- self.process_events()
649
+ if "win32" in sys.platform:
650
+ open("run_q2rad.vbs", "w").write(
651
+ 'WScript.CreateObject("WScript.Shell").Run '
652
+ '"q2rad\\scripts\\pythonw.exe -m q2rad", 0, false'
653
+ )
654
+
655
+ open("make_shortcut.vbs", "w").write(
656
+ 'Set oWS = WScript.CreateObject("WScript.Shell")\n'
657
+ 'Set oLink = oWS.CreateShortcut(oWS.SpecialFolders("Desktop") & "\\q2RAD.lnk")\n'
658
+ 'cu = WScript.CreateObject("Scripting.FileSystemObject").'
659
+ "GetParentFolderName(WScript.ScriptFullName)\n"
660
+ 'oLink.TargetPath = cu & "\\run_q2rad.vbs"\n'
661
+ 'oLink.WorkingDirectory = cu & ""\n'
662
+ 'oLink.Description = "q2RAD"\n'
663
+ 'oLink.IconLocation = cu & "\\assets\\q2rad.ico"\n'
664
+ "oLink.Save\n"
665
+ )
666
+
667
+ def write_reinstall_files(self):
668
+ if sys.prefix != sys.base_prefix: # in virtualenv
669
+ pip_command = (
670
+ "q2rad\\scripts\\python -m " if "win32" in sys.platform else "q2rad/script/python -m "
671
+ )
672
+ elif os.path.isdir("python.loc"):
673
+ pip_command = "python.loc\\python -m " if "win32" in sys.platform else "python.loc/python -m "
674
+ else:
675
+ pip_command = "python -m " if "win32" in sys.platform else "python -m "
676
+
677
+ self.write_restore_file(
678
+ "update_q2rad",
679
+ ("" if "win32" in sys.platform else "#!/bin/bash\n")
680
+ + f"{pip_command} pip install --upgrade --force-reinstall q2gui"
681
+ + f"&&{pip_command} pip install --upgrade --force-reinstall q2db"
682
+ + f"&&{pip_command} pip install --upgrade --force-reinstall q2report"
683
+ + f"&&{pip_command} pip install --upgrade --force-reinstall q2terminal"
684
+ + f"&&{pip_command} pip install --upgrade --force-reinstall q2rad",
685
+ )
658
686
 
659
687
  def get_package_versions(self, package):
660
688
  response = open_url(f"https://pypi.python.org/pypi/{package}/json") # noqa F405
q2rad/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.167"
1
+ __version__ = "0.1.168"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.167
3
+ Version: 0.1.168
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -2,23 +2,23 @@ q2rad/__init__.py,sha256=Y0Up-UTXOmCYC9llNmTF10CpDDgF2kv10pyHT3-YwmQ,183
2
2
  q2rad/__main__.py,sha256=zP4JARM-FzFHM-vWLehx7c5N4v4m_F-TuMobCdFzr4Q,824
3
3
  q2rad/q2actions.py,sha256=_vbahOkI2NrTeyra0sP0jqYDX1Ov3f32GoLfRqevEks,7175
4
4
  q2rad/q2appmanager.py,sha256=x37tKfvUu-w8Cbu_v-0kLJgnLPpJ2o4qKwWu90SqOaU,15464
5
- q2rad/q2appselector.py,sha256=fxEPeNZZxujf8KRFUHFYLYJrupRIe1-wS_qOqajK-og,12250
5
+ q2rad/q2appselector.py,sha256=H6rF_zJ6qOsUwKrUwaYl_YmPPSnWTsPawu-5RyJs_Lc,12198
6
6
  q2rad/q2constants.py,sha256=dQtN4OMvZw0FATDAFYjolI7eGMVUnNnbTl6qM-ggZ4I,3416
7
7
  q2rad/q2forms.py,sha256=yhTjLYZ2-UIo2Cz1K4wPY_pgsy9YGtm1NoJpGF3oh7U,10165
8
8
  q2rad/q2lines.py,sha256=jUx8_eDA0gZz3cx7_l3qKv-Gn4IRUtcqCyNIXeFWReA,12166
9
- q2rad/q2make.py,sha256=3OZW-f35MNQHVGa283Om1IMH-gXb1oKGCLLKeBqjgr8,4620
9
+ q2rad/q2make.py,sha256=JgRocf8cDVIFiC_cuZtYh86ZvwQAy9p7o6TF3LHF0B4,4621
10
10
  q2rad/q2market.py,sha256=koWwKKc1MVn0ud2XDu_dal8lBFEMLX8KABpZO_OzTIM,2597
11
11
  q2rad/q2modules.py,sha256=N3OkUKfiwVZtmDyAtnJcs2Rprd7uIHd0HhjHTyFoN_s,4294
12
12
  q2rad/q2packages.py,sha256=IpWEcAT9nLCHUGViInEyM4T1cLEwK9GtNcdGF-pk0tw,3345
13
13
  q2rad/q2queries.py,sha256=abr4Fi3ou1CJsTD6vNfcjcakzjE6xTvh6OYY4bNWQLA,12314
14
- q2rad/q2rad.py,sha256=3tkZd0mALa4NiaJEoVC-y4J1LhTXFpYeygv2wlC9YDU,41523
14
+ q2rad/q2rad.py,sha256=vnxy3MlksBzNiFm0VduiHpz96tdo3xsRPEZRDKokijw,42629
15
15
  q2rad/q2raddb.py,sha256=aG5SPEe4cnU_gO8zFmVkTDmIC0gcQFEIUv5NYGuqLlE,4372
16
16
  q2rad/q2reports.py,sha256=YhrbwFXTMTgtwIh5XSWaabseaZjRco34WO5mU676PU8,81238
17
17
  q2rad/q2stylesettings.py,sha256=esbfQoPgP7lJN2GRkqeQKjDpHCqCilJBzZf-c73ThCU,3593
18
18
  q2rad/q2utils.py,sha256=-U4TGTzinY-CrpMTdUAQQrOiG0BVGbeTykH9b6T5-nk,14136
19
- q2rad/version.py,sha256=PE0Dl4tRYciDvvrITYElbTFDUFVnQg3I_A-fvQyOGXY,23
20
- q2rad-0.1.167.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
21
- q2rad-0.1.167.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
22
- q2rad-0.1.167.dist-info/METADATA,sha256=yWaB7I05QkckP_yWkMuV8FDlObEtAgM_6fyeawY2dac,3509
23
- q2rad-0.1.167.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
24
- q2rad-0.1.167.dist-info/RECORD,,
19
+ q2rad/version.py,sha256=DyRSMmft4IGMe-tnzgBjtW1T7qXZwYslbQrz7HufbVo,23
20
+ q2rad-0.1.168.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
21
+ q2rad-0.1.168.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
22
+ q2rad-0.1.168.dist-info/METADATA,sha256=n_DoAsj0efX_ygqG2Lc0qO1grWkemQqZGAFXjZqLuzA,3509
23
+ q2rad-0.1.168.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
24
+ q2rad-0.1.168.dist-info/RECORD,,