8000 Merge pull request #1298 from stonebig/master · winpython/winpython@39dde54 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39dde54

Browse files
authored
Merge pull request #1298 from stonebig/master
control Panel removed, icon will launch wppm help instead
2 parents d887197 + f9de7e9 commit 39dde54

File tree

3 files changed

+28
-125
lines changed

3 files changed

+28
-125
lines changed

make.py

Lines changed: 15 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -717,12 +717,13 @@ def _create_launchers(self):
717717
command="$SYSDIR\cmd.exe",
718718
args=r"/k cmd.bat",
719719
)
720-
self.create_launcher(
721-
"WinPython Powershell Prompt.exe",
722-
"powershell.ico",
723-
command="$SYSDIR\cmd.exe",
724-
args=r"/k cmd_ps.bat",
725-
)
720+
# removed to reduce number of icons
721+
#self.create_launcher(
722+
# "WinPython Powershell Prompt.exe",
723+
# "powershell.ico",
724+
# command="$SYSDIR\cmd.exe",
725+
# args=r"/k cmd_ps.bat",
726+
#)
726727

727728
self.create_launcher(
728729
"WinPython Terminal.exe",
@@ -738,13 +739,6 @@ def _create_launchers(self):
738739
args=r"/k winpython.bat",
739740
)
740741

741-
#self.create_launcher(
742-
# "IDLEX.exe",
743-
# "python.ico",
744-
# command="wscript.exe",
745-
# args=r"Noshell.vbs winidlex.bat",
746-
#)
747-
748742
self.create_launcher(
749743
"IDLE (Python GUI).exe",
750744
"python.ico",
@@ -769,8 +763,10 @@ def _create_launchers(self):
769763
self.create_launcher(
770764
"WinPython Control Panel.exe",
771765
"winpython.ico",
772-
command="wscript.exe",
773-
args=r"Noshell.vbs wpcp.bat",
766+
# command="wscript.exe",
767+
# args=r"Noshell.vbs wpcp.bat",
768+
command="$SYSDIR\cmd.exe",
769+
args=r"/k wpcp.bat",
774770
)
775771

776772
# Multi-Qt launchers
@@ -819,13 +815,6 @@ def _create_launchers(self):
819815
args=r"/k winjupyter_lab.bat",
820816
)
821817

822-
#self.create_launcher(
823-
# "Pyzo.exe",
824-
# "pyzologo.ico",
825-
# command="wscript.exe",
826-
# args=r"Noshell.vbs winpyzo.bat",
827-
#)
828-
829818
# VSCode launcher
830819
self.create_launcher(
831820
"VS Code.exe",
@@ -1512,44 +1501,6 @@ def _create_batch_scripts(self):
15121501
do_changes=changes,
15131502
)
15141503

1515-
self.create_batch_script(
1516-
"idlex.bat",
1517-
r"""@echo off
1518-
call "%~dp0env_for_icons.bat" %*
1519-
rem backward compatibility for non-IDLEX users
1520-
if exist "%WINPYDIR%\scripts\idlex.pyw" (
1521-
"%WINPYDIR%\python.exe" "%WINPYDIR%\scripts\idlex.pyw" %*
1522-
) else (
1523-
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %*
1524-
)
1525-
""",
1526-
do_changes=changes,
1527-
)
1528-
1529-
self.create_batch_script(
1530-
"idle.bat",
1531-
r"""@echo off
1532-
call "%~dp0env_for_icons.bat" %*
1533-
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %*
1534-
1535-
""",
1536-
do_changes=changes,
1537-
)
1538-
self.create_batch_script(
1539-
"winidlex.bat",
1540-
r"""@echo off
1541-
1542-
call "%~dp0env_for_icons.bat" %*
1543-
cd/D "%WINPYWORKDIR1%"
1544-
rem backward compatibility for non-IDLEX users
1545-
if exist "%WINPYDIR%\scripts\idlex.pyw" (
1546-
"%WINPYDIR%\python.exe" "%WINPYDIR%\scripts\idlex.pyw" %*
1547-
) else (
1548-
echo "%WINPYDIR%\scripts\idlex.pyw" for IDLEX not found !"
1549-
)
1550-
""",
1551-
do_changes=changes,
1552-
)
15531504
self.create_batch_script(
15541505
"winidle.bat",
15551506
r"""@echo off
@@ -1560,18 +1511,6 @@ def _create_batch_scripts(self):
15601511
do_changes=changes,
15611512
)
15621513

1563-
self.create_batch_script(
1564-
"spyder.bat",
1565-
r"""@echo off
1566-
call "%~dp0env_for_icons.bat" %*
1567-
rem cd/D "%WINPYWORKDIR%"
1568-
if exist "%WINPYDIR%\scripts\spyder3.exe" (
1569-
"%WINPYDIR%\scripts\spyder3.exe" %* -w "%WINPYWORKDIR1%"
1570-
) else (
1571-
"%WINPYDIR%\scripts\spyder.exe" %* -w "%WINPYWORKDIR1%"
1572-
)
1573-
""",
1574-
)
15751514
self.create_batch_script(
15761515
"winspyder.bat",
15771516
r"""@echo off
@@ -1598,15 +1537,6 @@ def _create_batch_scripts(self):
15981537
""",
15991538
)
16001539

1601-
self.create_batch_script(
1602-
"ipython_notebook.bat",
1603-
r"""@echo off
1604-
call "%~dp0env_for_icons.bat" %*
1605-
cd/D "%WINPYWORKDIR1%"
1606-
"%WINPYDIR%\scripts\jupyter-notebook.exe" %*
1607-
""",
1608-
)
1609-
16101540
self.create_batch_script(
16111541
"winipython_notebook.bat",
16121542
r"""@echo off
@@ -1634,15 +1564,6 @@ def _create_batch_scripts(self):
16341564
""",
16351565
)
16361566

1637-
self.create_batch_script(
1638-
"qtconsole.bat",
1639-
r"""@echo off
1640-
call "%~dp0env_for_icons.bat" %*
1641-
cd/D "%WINPYWORKDIR1%"
1642-
"%WINPYDIR%\scripts\jupyter-qtconsole.exe" %*
1643-
""",
1644-
)
1645-
16461567
self.create_batch_script(
16471568
"winqtconsole.bat",
16481569
r"""@echo off
@@ -1786,15 +1707,14 @@ def _create_batch_scripts(self):
17861707
"wpcp.bat",
17871708
r"""@echo off
17881709
call "%~dp0env_for_icons.bat" %*
1789-
cd/D "%WINPYWORKDIR1%"
1790-
"%WINPYDIR%\python.exe" -m winpython.controlpanel %*
1710+
rem cd/D "%WINPYWORKDIR1%"
1711+
rem "%WINPYDIR%\python.exe" -m winpython.controlpanel %*
1712+
if not "%WINPYWORKDIR%"=="%WINPYWORKDIR1%" cd/d %WINPYWORKDIR1%
1713+
cmd.exe /k "echo wppm & echo & wppm"
17911714
""",
17921715
do_changes=changes,
17931716
)
17941717

1795-
# self.create_python_batch('wpcp.bat', '-m winpython.controlpanel',
1796-
# workdir=r'"%WINPYDIR%\Scripts"')
1797-
17981718
self.create_batch_script(
17991719
"upgrade_pip.bat",
18001720
r"""@echo off

winpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '7.2.20240224'
31+
__version__ = '7.3.20240303'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/wppm.py

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -730,29 +730,14 @@ def main(test=False):
730730
bold = "\033[1m"
731731
unbold = "\033[0m"
732732
registerWinPythonHelp = f"""Register distribution
733-
({bold}experimental{unbold})
734-
This will associate file extensions, icons and
735-
Windows explorer's context menu entries ('Edit with IDLE', ...)
736-
with selected Python distribution in Windows registry.
737-
738-
Shortcuts for all WinPython launchers will be installed
739-
in {unbold}WinPython{unbold} Start menu group (replacing existing
740-
shortcuts).
741-
742-
{bold}Note{unbold}: these actions are similar to those performed
743-
when installing old Pythons with the official installer before 'py'
744-
.
733+
Associate file extensions, icons and context menu entries with this WinPython.
734+
Create a menu group {unbold}WinPython{unbold} for this WinPython launchers.
745735
"""
746736

747737
unregisterWinPythonHelp = f"""Unregister distribution
748-
({bold}experimental{unbold})
749-
This will remove file extensions associations, icons and
750-
Windows explorer's context menu entries ('Edit with IDLE', ...)
751-
with selected Python distribution in Windows registry.
752-
753-
Shortcuts for all WinPython launchers will be removed
754-
from {bold}WinPython{unbold} Start menu group."
755-
."""
738+
De-Associate file extensions, icons and context menu entries from this WinPython.
739+
Remove menu group {unbold}WinPython{unbold} .
740+
"""
756741

757742
parser = ArgumentParser(
758743
description="WinPython Package Manager: view, install, "
@@ -770,7 +755,6 @@ def main(test=False):
770755
)
771756
parser.add_argument(
772757
"-t",
773-
"--target",
774758
dest="target",
775759
default=sys.prefix,
776760
help="path to target Python distribution " f'(default: "{sys.prefix}")',
@@ -782,7 +766,7 @@ def main(test=False):
782766
action="store_const",
783767
const=True,
784768
default=False,
785-
help="install package (this is the default action)",
769+
help="install a given package wheel (otherwise use pip)",
786770
)
787771
parser.add_argument(
788772
"-u",
@@ -800,7 +784,7 @@ def main(test=False):
800784
action="store_const",
801785
const=True,
802786
default=False,
803-
help="show reverse dependancies of the package",
787+
help="show reverse dependancies of the given package[option]. {unbold}wppm -r pytest[test]{unbold}",
804788
)
805789
parser.add_argument(
806790
"-p",
@@ -809,15 +793,14 @@ def main(test=False):
809793
action="store_const",
810794
const=True,
811795
default=False,
812-
help="show dependancies of the package",
796+
help="show dependancies of the given package[option]. {unbold}wppm -p pandas[test]{unbold}",
813797
)
814798
parser.add_argument(
815799
"-l",
816-
"--levels_of_depth",
817-
dest="levels_of_depth",
800+
dest="levels",
818801
type=int,
819802
default=2,
820-
help="show l levels_of_depth",
803+
help="show l levels of depth of hierarchy from given package",
821804
)
822805
parser.add_argument(
823806
"-ls",
@@ -826,7 +809,7 @@ def main(test=False):
826809
action="store_const",
827810
const=True,
828811
default=False,
829-
help="list packages matching the given regular expression",
812+
help="list packages matching the given expression. {unbold}wppm -ls{unbold}",
830813
)
831814
parser.add_argument(
832815
"-lsa",
@@ -835,7 +818,7 @@ def main(test=False):
835818
action="store_const",
836819
const=True,
837820
default=False,
838-
help="list all detail of packages matching the given regular expression (pip inspect)",
821+
help="list details of packages matching the given regular expression (pip inspect)",
839822
)
840823
parser.add_argument(
841824
"-v",

0 commit comments

Comments
 (0)
0