moleditpy-installer 3.1.2__tar.gz → 4.0.0__tar.gz
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.
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/PKG-INFO +47 -25
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/README.md +165 -141
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/main.py +40 -14
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/tui.py +13 -7
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/PKG-INFO +47 -25
- moleditpy_installer-4.0.0/moleditpy_installer.egg-info/requires.txt +8 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/pyproject.toml +3 -5
- moleditpy_installer-3.1.2/moleditpy_installer.egg-info/requires.txt +0 -16
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/LICENSE +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/__init__.py +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/__main__.py +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon.icns +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon.ico +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_128.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_16.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_22.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_24.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_32.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_48.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_64.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/icon.icns +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/icon.ico +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/icon.png +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/SOURCES.txt +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/dependency_links.txt +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/entry_points.txt +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/top_level.txt +0 -0
- {moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moleditpy-installer
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Installer and application bundler for MoleditPy
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -687,14 +687,12 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
687
687
|
Classifier: Intended Audience :: Science/Research
|
|
688
688
|
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
689
689
|
Classifier: Operating System :: OS Independent
|
|
690
|
-
Requires-Python:
|
|
690
|
+
Requires-Python: <3.15,>=3.9
|
|
691
691
|
Description-Content-Type: text/markdown
|
|
692
692
|
License-File: LICENSE
|
|
693
693
|
Requires-Dist: pyshortcuts>=1.0.0
|
|
694
694
|
Requires-Dist: textual>=0.86
|
|
695
|
-
Requires-Dist: moleditpy
|
|
696
|
-
Requires-Dist: moleditpy; sys_platform == "win32"
|
|
697
|
-
Requires-Dist: moleditpy; sys_platform == "darwin"
|
|
695
|
+
Requires-Dist: moleditpy<6,>=5.0.0a1
|
|
698
696
|
Provides-Extra: test
|
|
699
697
|
Requires-Dist: pytest>=7.0; extra == "test"
|
|
700
698
|
Requires-Dist: pytest-mock>=3.0; extra == "test"
|
|
@@ -707,23 +705,36 @@ Dynamic: license-file
|
|
|
707
705
|
[](https://pypi.org/project/moleditpy-installer/)
|
|
708
706
|
[](https://pypi.org/project/moleditpy-installer/)
|
|
709
707
|
|
|
710
|
-
This package is a helper utility that
|
|
708
|
+
This package is a helper utility that installs the unified MoleditPy 5 package on every supported OS, creates an application menu shortcut, and registers the `.pmeprj` double-click file association on Windows, macOS, and Linux.
|
|
711
709
|
|
|
712
710
|

|
|
713
711
|
|
|
712
|
+
## Quick start and command choice
|
|
713
|
+
|
|
714
|
+
Use a dedicated virtual environment, or activate the environment where MoleditPy should live. See the [Windows/macOS/Linux quick start](https://github.com/HiroYokoyama/python_molecular_editor/wiki/Quick-Start) for commands that use an explicit environment path.
|
|
715
|
+
|
|
716
|
+
```bash
|
|
717
|
+
python -m pip install moleditpy-installer
|
|
718
|
+
python -m moleditpy_installer
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
Both `python -m moleditpy_installer` and `moleditpy-installer` are supported. **Prefer the module form**: it runs under the Python you selected and avoids depending on the console script being on `PATH`. If `python` is not your environment's interpreter, substitute its full path (or `python3` on macOS/Linux outside an activated environment). Use that same interpreter for `-m pip`.
|
|
722
|
+
|
|
723
|
+
Installing the package installs the app dependency. Running the installer configures launchers and file associations. For a non-interactive setup use `python -m moleditpy_installer --no-tui`; to inspect discovery first use `python -m moleditpy_installer --check`. The standalone Windows/macOS download is a separate distribution with different plugin-dependency limitations.
|
|
724
|
+
|
|
714
725
|
## How to Use
|
|
715
726
|
|
|
716
727
|
1. **Install**
|
|
717
728
|
```bash
|
|
718
|
-
pip install moleditpy-installer
|
|
729
|
+
python -m pip install moleditpy-installer
|
|
719
730
|
```
|
|
720
|
-
This
|
|
731
|
+
This installs the unified MoleditPy 5 package as a dependency. Python 3.9 through 3.14 is supported. The helper creates shortcuts and file associations; it does not build a frozen application.
|
|
721
732
|
|
|
722
733
|
2. **Run the interactive installer (TUI)**
|
|
723
734
|
Run the following command in your terminal. In an interactive terminal this opens a TUI where you pick the components — Desktop shortcut, application-menu entry, `.pmeprj` file association — and the scope (per-user or system-wide), then press **Install**:
|
|
724
735
|
|
|
725
736
|
```bash
|
|
726
|
-
|
|
737
|
+
python -m moleditpy_installer
|
|
727
738
|
```
|
|
728
739
|
|
|
729
740
|
Defaults: Desktop shortcut **off**, application menu **on**, file association **on**, per-user scope, executable **auto-detected**. The **Executable path** field at the bottom of the panel is optional — leave it empty to auto-detect, or type the path to the `moleditpy` executable (or the `Scripts`/`bin` folder holding it) when your installation lives somewhere the search does not cover. The **Install** button is focused on start, so pressing **Enter** immediately installs with the defaults. Move between widgets with **Tab** / **Shift+Tab** (the arrow keys also switch between the Install / Uninstall / Quit buttons). After a successful install or uninstall the TUI stays open for two seconds, then exits and replays the full log in the terminal.
|
|
@@ -731,11 +742,11 @@ This package is a helper utility that automatically installs the correct version
|
|
|
731
742
|
**Non-interactive / scripted use** (also what runs automatically when there is no terminal):
|
|
732
743
|
|
|
733
744
|
```bash
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
sudo
|
|
738
|
-
|
|
745
|
+
python -m moleditpy_installer --no-tui # install with the defaults
|
|
746
|
+
python -m moleditpy_installer --desktop # also create a Desktop shortcut
|
|
747
|
+
python -m moleditpy_installer --no-file-assoc # skip the .pmeprj association
|
|
748
|
+
sudo /absolute/path/to/env/bin/python -m moleditpy_installer --system # system-wide (admin terminal on Windows)
|
|
749
|
+
python -m moleditpy_installer --exe-path /opt/env/bin/moleditpy # point at the executable yourself
|
|
739
750
|
```
|
|
740
751
|
|
|
741
752
|
Any explicit option skips the TUI.
|
|
@@ -743,21 +754,21 @@ This package is a helper utility that automatically installs the correct version
|
|
|
743
754
|
**Manual executable path.** If the automatic search cannot find your installation, pass `--exe-path` (or fill in the TUI field). It accepts the executable itself or the directory holding it, expands `~` and environment variables, and strips surrounding quotes:
|
|
744
755
|
|
|
745
756
|
```bash
|
|
746
|
-
|
|
747
|
-
|
|
757
|
+
python -m moleditpy_installer --exe-path "~/my envs/chem/bin" # a Scripts/bin directory
|
|
758
|
+
python -m moleditpy_installer --check --exe-path C:\envs\chem\Scripts\moleditpy.exe
|
|
748
759
|
```
|
|
749
760
|
|
|
750
761
|
A path given this way is never silently replaced by a search result: if it is wrong, the installer reports why and stops.
|
|
751
762
|
|
|
752
763
|
> **Security Note:** File associations for `.pmeraw` files have been intentionally removed. Opening `.pmeraw` files downloaded from the internet can be potentially unsecure, so they are no longer automatically associated with the application.
|
|
753
764
|
|
|
754
|
-
|
|
765
|
+
The console-script alternative is also supported when its Scripts/bin directory is on `PATH`:
|
|
755
766
|
|
|
756
767
|
```bash
|
|
757
|
-
|
|
768
|
+
moleditpy-installer
|
|
758
769
|
```
|
|
759
770
|
|
|
760
|
-
> **Note:** `python -m moleditpy-installer` (with a hyphen)
|
|
771
|
+
> **Note:** `python -m moleditpy-installer` (with a hyphen) does not name this package’s Python module and will not work. Always use the underscore form (`moleditpy_installer`) with `-m`.
|
|
761
772
|
|
|
762
773
|
> **Tip:** Run the installer from the Python environment where `moleditpy` is installed (e.g. after `conda activate <env>`). The installer verifies the launch command and warns you if the pairing cannot start MoleditPy.
|
|
763
774
|
|
|
@@ -765,18 +776,18 @@ This package is a helper utility that automatically installs the correct version
|
|
|
765
776
|
To remove the shortcuts, unregister file associations, and clean up extracted icon files, run (add `--system` for a system-wide install; `--remove` remains as a deprecated alias):
|
|
766
777
|
|
|
767
778
|
```bash
|
|
768
|
-
moleditpy-installer --uninstall
|
|
769
|
-
# or
|
|
770
779
|
python -m moleditpy_installer --uninstall
|
|
780
|
+
# or, if the console script is on PATH
|
|
781
|
+
moleditpy-installer --uninstall
|
|
771
782
|
```
|
|
772
783
|
|
|
773
|
-
> **Note:** this removes the shortcuts and file associations only. To fully remove MoleditPy itself, also run `
|
|
784
|
+
> **Note:** this removes the shortcuts and file associations only. To fully remove MoleditPy itself, also run `python -m pip uninstall moleditpy`.
|
|
774
785
|
|
|
775
786
|
4. **Check Executable Location**
|
|
776
787
|
To search for the `moleditpy` executable in the search paths and print the located path:
|
|
777
788
|
|
|
778
789
|
```bash
|
|
779
|
-
|
|
790
|
+
python -m moleditpy_installer --check
|
|
780
791
|
```
|
|
781
792
|
This command returns exit code `0` if the executable is found, and `1` otherwise. On macOS it additionally verifies that the launcher's interpreter/script pairing can actually start MoleditPy. Add `--exe-path <path>` to validate a specific location instead of searching.
|
|
782
793
|
|
|
@@ -786,14 +797,14 @@ This package is a helper utility that automatically installs the correct version
|
|
|
786
797
|
To show the version of the installer:
|
|
787
798
|
|
|
788
799
|
```bash
|
|
789
|
-
|
|
800
|
+
python -m moleditpy_installer --version
|
|
790
801
|
```
|
|
791
802
|
|
|
792
803
|
6. **Help**
|
|
793
804
|
To see all available options, run:
|
|
794
805
|
|
|
795
806
|
```bash
|
|
796
|
-
|
|
807
|
+
python -m moleditpy_installer --help
|
|
797
808
|
```
|
|
798
809
|
|
|
799
810
|
## What the installer sets up
|
|
@@ -817,6 +828,15 @@ This package is a helper utility that automatically installs the correct version
|
|
|
817
828
|
|
|
818
829
|
`moleditpy-installer --uninstall` undoes all of the above for the current user (add `--system` for system-wide installs).
|
|
819
830
|
|
|
831
|
+
## Version 3.1.3 fixes
|
|
832
|
+
|
|
833
|
+
- Report failed file-association and Linux system-launcher setup correctly.
|
|
834
|
+
- Serialize TUI actions and preserve logging while background discovery runs.
|
|
835
|
+
- Preserve other Linux MIME handlers during uninstall and prefer the active virtual environment during discovery.
|
|
836
|
+
- Quote macOS launcher paths safely and validate release tags against package metadata.
|
|
837
|
+
|
|
838
|
+
See [the changelog](https://github.com/HiroYokoyama/python_molecular_editor_installer/blob/main/CHANGELOG.md) for details.
|
|
839
|
+
|
|
820
840
|
## Version 3.1 highlights
|
|
821
841
|
|
|
822
842
|
- **New:** manual executable path — `--exe-path` on the command line and an **Executable path** field in the TUI, for installations the automatic search cannot find. Accepts the executable or the directory holding it; a wrong path is reported instead of being silently replaced by a search result.
|
|
@@ -842,3 +862,5 @@ This package is a helper utility that automatically installs the correct version
|
|
|
842
862
|
- **New:** `.pmeprj` double-click support and document icon on Linux (per-user MIME registration).
|
|
843
863
|
- **New:** `--check` verifies launchability on macOS; `--remove` also unregisters the bundle from Launch Services and removes extracted icons.
|
|
844
864
|
- Icons no longer live in the temp folder (Windows shortcut/registry icons no longer break after cleanup).
|
|
865
|
+
|
|
866
|
+
Replace `/absolute/path/to/env/bin/python` with the actual environment interpreter for a system-wide Unix install. On Windows, use the intended environment’s Python from an administrator terminal.
|
|
@@ -1,141 +1,165 @@
|
|
|
1
|
-
# MoleditPy Installer
|
|
2
|
-
|
|
3
|
-
[](https://github.com/HiroYokoyama/python_molecular_editor_installer/actions/workflows/ci.yml)
|
|
4
|
-
[](https://pypi.org/project/moleditpy-installer/)
|
|
5
|
-
[](https://pypi.org/project/moleditpy-installer/)
|
|
6
|
-
|
|
7
|
-
This package is a helper utility that
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
> **Note:**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
moleditpy
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
- `.pmeprj`
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
1
|
+
# MoleditPy Installer
|
|
2
|
+
|
|
3
|
+
[](https://github.com/HiroYokoyama/python_molecular_editor_installer/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/moleditpy-installer/)
|
|
5
|
+
[](https://pypi.org/project/moleditpy-installer/)
|
|
6
|
+
|
|
7
|
+
This package is a helper utility that installs the unified MoleditPy 5 package on every supported OS, creates an application menu shortcut, and registers the `.pmeprj` double-click file association on Windows, macOS, and Linux.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Quick start and command choice
|
|
12
|
+
|
|
13
|
+
Use a dedicated virtual environment, or activate the environment where MoleditPy should live. See the [Windows/macOS/Linux quick start](https://github.com/HiroYokoyama/python_molecular_editor/wiki/Quick-Start) for commands that use an explicit environment path.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m pip install moleditpy-installer
|
|
17
|
+
python -m moleditpy_installer
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Both `python -m moleditpy_installer` and `moleditpy-installer` are supported. **Prefer the module form**: it runs under the Python you selected and avoids depending on the console script being on `PATH`. If `python` is not your environment's interpreter, substitute its full path (or `python3` on macOS/Linux outside an activated environment). Use that same interpreter for `-m pip`.
|
|
21
|
+
|
|
22
|
+
Installing the package installs the app dependency. Running the installer configures launchers and file associations. For a non-interactive setup use `python -m moleditpy_installer --no-tui`; to inspect discovery first use `python -m moleditpy_installer --check`. The standalone Windows/macOS download is a separate distribution with different plugin-dependency limitations.
|
|
23
|
+
|
|
24
|
+
## How to Use
|
|
25
|
+
|
|
26
|
+
1. **Install**
|
|
27
|
+
```bash
|
|
28
|
+
python -m pip install moleditpy-installer
|
|
29
|
+
```
|
|
30
|
+
This installs the unified MoleditPy 5 package as a dependency. Python 3.9 through 3.14 is supported. The helper creates shortcuts and file associations; it does not build a frozen application.
|
|
31
|
+
|
|
32
|
+
2. **Run the interactive installer (TUI)**
|
|
33
|
+
Run the following command in your terminal. In an interactive terminal this opens a TUI where you pick the components — Desktop shortcut, application-menu entry, `.pmeprj` file association — and the scope (per-user or system-wide), then press **Install**:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
python -m moleditpy_installer
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Defaults: Desktop shortcut **off**, application menu **on**, file association **on**, per-user scope, executable **auto-detected**. The **Executable path** field at the bottom of the panel is optional — leave it empty to auto-detect, or type the path to the `moleditpy` executable (or the `Scripts`/`bin` folder holding it) when your installation lives somewhere the search does not cover. The **Install** button is focused on start, so pressing **Enter** immediately installs with the defaults. Move between widgets with **Tab** / **Shift+Tab** (the arrow keys also switch between the Install / Uninstall / Quit buttons). After a successful install or uninstall the TUI stays open for two seconds, then exits and replays the full log in the terminal.
|
|
40
|
+
|
|
41
|
+
**Non-interactive / scripted use** (also what runs automatically when there is no terminal):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
python -m moleditpy_installer --no-tui # install with the defaults
|
|
45
|
+
python -m moleditpy_installer --desktop # also create a Desktop shortcut
|
|
46
|
+
python -m moleditpy_installer --no-file-assoc # skip the .pmeprj association
|
|
47
|
+
sudo /absolute/path/to/env/bin/python -m moleditpy_installer --system # system-wide (admin terminal on Windows)
|
|
48
|
+
python -m moleditpy_installer --exe-path /opt/env/bin/moleditpy # point at the executable yourself
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Any explicit option skips the TUI.
|
|
52
|
+
|
|
53
|
+
**Manual executable path.** If the automatic search cannot find your installation, pass `--exe-path` (or fill in the TUI field). It accepts the executable itself or the directory holding it, expands `~` and environment variables, and strips surrounding quotes:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -m moleditpy_installer --exe-path "~/my envs/chem/bin" # a Scripts/bin directory
|
|
57
|
+
python -m moleditpy_installer --check --exe-path C:\envs\chem\Scripts\moleditpy.exe
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A path given this way is never silently replaced by a search result: if it is wrong, the installer reports why and stops.
|
|
61
|
+
|
|
62
|
+
> **Security Note:** File associations for `.pmeraw` files have been intentionally removed. Opening `.pmeraw` files downloaded from the internet can be potentially unsecure, so they are no longer automatically associated with the application.
|
|
63
|
+
|
|
64
|
+
The console-script alternative is also supported when its Scripts/bin directory is on `PATH`:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
moleditpy-installer
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
> **Note:** `python -m moleditpy-installer` (with a hyphen) does not name this package’s Python module and will not work. Always use the underscore form (`moleditpy_installer`) with `-m`.
|
|
71
|
+
|
|
72
|
+
> **Tip:** Run the installer from the Python environment where `moleditpy` is installed (e.g. after `conda activate <env>`). The installer verifies the launch command and warns you if the pairing cannot start MoleditPy.
|
|
73
|
+
|
|
74
|
+
3. **Uninstall**
|
|
75
|
+
To remove the shortcuts, unregister file associations, and clean up extracted icon files, run (add `--system` for a system-wide install; `--remove` remains as a deprecated alias):
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
python -m moleditpy_installer --uninstall
|
|
79
|
+
# or, if the console script is on PATH
|
|
80
|
+
moleditpy-installer --uninstall
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
> **Note:** this removes the shortcuts and file associations only. To fully remove MoleditPy itself, also run `python -m pip uninstall moleditpy`.
|
|
84
|
+
|
|
85
|
+
4. **Check Executable Location**
|
|
86
|
+
To search for the `moleditpy` executable in the search paths and print the located path:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
python -m moleditpy_installer --check
|
|
90
|
+
```
|
|
91
|
+
This command returns exit code `0` if the executable is found, and `1` otherwise. On macOS it additionally verifies that the launcher's interpreter/script pairing can actually start MoleditPy. Add `--exe-path <path>` to validate a specific location instead of searching.
|
|
92
|
+
|
|
93
|
+
For the complete list of directories scanned on Windows, macOS, and Linux, see [docs/path.md](docs/path.md).
|
|
94
|
+
|
|
95
|
+
5. **Print Version**
|
|
96
|
+
To show the version of the installer:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
python -m moleditpy_installer --version
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
6. **Help**
|
|
103
|
+
To see all available options, run:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
python -m moleditpy_installer --help
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## What the installer sets up
|
|
110
|
+
|
|
111
|
+
### Windows
|
|
112
|
+
- Start Menu shortcut (icon included); Desktop shortcut when enabled (`--desktop` or the TUI checkbox). With `--system` (admin) the shortcuts go to the all-users locations and the association to HKLM.
|
|
113
|
+
- `.pmeprj` files open MoleditPy on double-click (per-user registry, no admin rights needed).
|
|
114
|
+
- Icons are stored under `%LOCALAPPDATA%\MoleditPy\installer` so they survive temp-folder cleanup.
|
|
115
|
+
|
|
116
|
+
### macOS
|
|
117
|
+
- A `MoleditPy.app` launcher in `~/Applications` (or `/Applications` with `--system`), plus a Desktop copy when enabled, with the MoleditPy icon.
|
|
118
|
+
- The launcher pairs the `moleditpy` script with the Python interpreter of **its own environment** (detected from the adjacent interpreter or the script's shebang), so it keeps working even when the installer runs from a different environment.
|
|
119
|
+
- MoleditPy always opens inside a **Terminal window**, so Python output and any errors stay visible. The first launch shows a one-time macOS consent prompt ("MoleditPy wants access to control Terminal") — click OK.
|
|
120
|
+
- Double-clicking `.pmeprj` files opens MoleditPy: the app bundle declares the `com.moleditpy.pmeprj` document type (exported UTI) and is registered with Launch Services. `.pmeprj` documents get their own file icon, matching the Windows behavior.
|
|
121
|
+
- The bundle is ad-hoc code-signed after configuration; required on Apple Silicon.
|
|
122
|
+
|
|
123
|
+
### Linux
|
|
124
|
+
- Application-menu `.desktop` entry (icon included; Desktop copy when enabled), launched in a terminal so output stays visible (matching macOS). With `--system` the entry goes to `/usr/share/applications`.
|
|
125
|
+
- `.pmeprj` files open MoleditPy on double-click: a per-user `application/x-moleditpy-project` MIME type is registered (freedesktop shared-mime-info, no root needed) and set as the default handler.
|
|
126
|
+
- `.pmeprj` documents get their own file icon in file managers, matching Windows and macOS.
|
|
127
|
+
|
|
128
|
+
`moleditpy-installer --uninstall` undoes all of the above for the current user (add `--system` for system-wide installs).
|
|
129
|
+
|
|
130
|
+
## Version 3.1.3 fixes
|
|
131
|
+
|
|
132
|
+
- Report failed file-association and Linux system-launcher setup correctly.
|
|
133
|
+
- Serialize TUI actions and preserve logging while background discovery runs.
|
|
134
|
+
- Preserve other Linux MIME handlers during uninstall and prefer the active virtual environment during discovery.
|
|
135
|
+
- Quote macOS launcher paths safely and validate release tags against package metadata.
|
|
136
|
+
|
|
137
|
+
See [the changelog](https://github.com/HiroYokoyama/python_molecular_editor_installer/blob/main/CHANGELOG.md) for details.
|
|
138
|
+
|
|
139
|
+
## Version 3.1 highlights
|
|
140
|
+
|
|
141
|
+
- **New:** manual executable path — `--exe-path` on the command line and an **Executable path** field in the TUI, for installations the automatic search cannot find. Accepts the executable or the directory holding it; a wrong path is reported instead of being silently replaced by a search result.
|
|
142
|
+
- **Fixed:** `conda run` was applied to executables belonging to a *different* environment, producing a launcher that failed with `ModuleNotFoundError: No module named 'moleditpy'`. It is now used only when the executable really lives in the active `CONDA_PREFIX`.
|
|
143
|
+
- **Fixed:** system-wide installs referenced icons in the installing user's private directory (`%LOCALAPPDATA%`, or `/root/.moleditpy` under `sudo`), so other users saw a blank icon. Shared scopes now use `%PROGRAMDATA%`, `/usr/share`, and `/usr/local/share` (macOS).
|
|
144
|
+
- **Fixed:** on Windows, an earlier "Open with" choice pinned by Explorer kept overriding a freshly installed `.pmeprj` association.
|
|
145
|
+
- **Fixed:** `--check` named the same command twice in its failure message on Linux.
|
|
146
|
+
|
|
147
|
+
## Version 3.0 highlights
|
|
148
|
+
|
|
149
|
+
- **New:** interactive Textual TUI — pick components and scope, watch the log, press Install/Remove.
|
|
150
|
+
- **New:** component selection (`--desktop`, `--app-menu`, `--file-assoc`) with safer defaults (no Desktop shortcut unless requested).
|
|
151
|
+
- **New:** system-wide scope on Linux (`/usr/share`), macOS (`/Applications`), and Windows (HKLM + all-users Start Menu; admin terminal) — all requiring sudo/admin.
|
|
152
|
+
- Per-user Linux paths now honor `XDG_DATA_HOME`.
|
|
153
|
+
- End-to-end smoke tests on all three OSes in CI, including the sudo/system path.
|
|
154
|
+
|
|
155
|
+
## Version 2.0 highlights
|
|
156
|
+
|
|
157
|
+
- **Fixed:** silent launch failures on macOS caused by an invalidated app-bundle code signature (Apple Silicon refused to start the app and ignored its icon).
|
|
158
|
+
- **Fixed:** `ModuleNotFoundError: No module named 'moleditpy'` when the installer ran in a different Python environment than the one holding `moleditpy` — the launcher now uses the script's own interpreter and the command is verified at install time.
|
|
159
|
+
- **New:** MoleditPy launches in a visible Terminal window on macOS.
|
|
160
|
+
- **New:** `.pmeprj` double-click support on macOS via a proper exported UTI + Launch Services registration.
|
|
161
|
+
- **New:** `.pmeprj` double-click support and document icon on Linux (per-user MIME registration).
|
|
162
|
+
- **New:** `--check` verifies launchability on macOS; `--remove` also unregisters the bundle from Launch Services and removes extracted icons.
|
|
163
|
+
- Icons no longer live in the temp folder (Windows shortcut/registry icons no longer break after cleanup).
|
|
164
|
+
|
|
165
|
+
Replace `/absolute/path/to/env/bin/python` with the actual environment interpreter for a system-wide Unix install. On Windows, use the intended environment’s Python from an administrator terminal.
|
|
@@ -189,7 +189,7 @@ def get_icon_path(system_scope: bool = False) -> Optional[str]:
|
|
|
189
189
|
return _extract_data_file(icon_name, system=system_scope)
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
def find_executable(name: str) -> Optional[str]:
|
|
192
|
+
def find_executable(name: str, *, quiet: bool = False) -> Optional[str]:
|
|
193
193
|
"""
|
|
194
194
|
Finds the path to the specified executable.
|
|
195
195
|
|
|
@@ -202,6 +202,7 @@ def find_executable(name: str) -> Optional[str]:
|
|
|
202
202
|
|
|
203
203
|
Args:
|
|
204
204
|
name (str): The name of the executable (e.g., 'moleditpy').
|
|
205
|
+
quiet (bool): Suppress discovery messages without redirecting stdout.
|
|
205
206
|
|
|
206
207
|
Returns:
|
|
207
208
|
Optional[str]: The absolute path to the executable, or None if not found.
|
|
@@ -214,12 +215,15 @@ def find_executable(name: str) -> Optional[str]:
|
|
|
214
215
|
candidate = candidate.with_suffix(".exe")
|
|
215
216
|
if candidate.is_file() and os.access(candidate, os.X_OK):
|
|
216
217
|
result = str(candidate)
|
|
217
|
-
|
|
218
|
+
if not quiet:
|
|
219
|
+
print(f"Found executable: {result}")
|
|
218
220
|
return result
|
|
219
221
|
return None
|
|
220
222
|
|
|
221
223
|
# 1 & 2. Dirs relative to the Python interpreter (reliable even under `python -m`)
|
|
222
|
-
|
|
224
|
+
# POSIX venv interpreters are commonly symlinks to the base Python.
|
|
225
|
+
# Resolving the link would search the base environment before the venv.
|
|
226
|
+
python_dir = Path(os.path.abspath(sys.executable)).parent
|
|
223
227
|
for scripts_dir in (
|
|
224
228
|
python_dir / "Scripts",
|
|
225
229
|
python_dir,
|
|
@@ -413,7 +417,8 @@ def find_executable(name: str) -> Optional[str]:
|
|
|
413
417
|
# 5. Fallback: system PATH
|
|
414
418
|
path_from_shutil = shutil.which(name)
|
|
415
419
|
if path_from_shutil:
|
|
416
|
-
|
|
420
|
+
if not quiet:
|
|
421
|
+
print(f"Found executable in system PATH: {path_from_shutil}")
|
|
417
422
|
return path_from_shutil
|
|
418
423
|
|
|
419
424
|
return None
|
|
@@ -818,8 +823,24 @@ def _clean_linux_mimeapps() -> None:
|
|
|
818
823
|
continue
|
|
819
824
|
try:
|
|
820
825
|
lines = path.read_text(encoding="utf-8").splitlines()
|
|
821
|
-
kept = [
|
|
822
|
-
|
|
826
|
+
kept = []
|
|
827
|
+
for line in lines:
|
|
828
|
+
key, separator, value = line.partition("=")
|
|
829
|
+
handlers = value.split(";")
|
|
830
|
+
if (
|
|
831
|
+
separator
|
|
832
|
+
and key.strip() == LINUX_MIME_TYPE
|
|
833
|
+
and "MoleditPy.desktop" in handlers
|
|
834
|
+
):
|
|
835
|
+
remaining = [
|
|
836
|
+
handler for handler in handlers
|
|
837
|
+
if handler and handler != "MoleditPy.desktop"
|
|
838
|
+
]
|
|
839
|
+
if remaining:
|
|
840
|
+
kept.append(f"{key}={';'.join(remaining)};")
|
|
841
|
+
else:
|
|
842
|
+
kept.append(line)
|
|
843
|
+
if kept != lines:
|
|
823
844
|
path.write_text("\n".join(kept) + "\n", encoding="utf-8")
|
|
824
845
|
print(f" Cleaned {path}")
|
|
825
846
|
except OSError as e:
|
|
@@ -1400,7 +1421,8 @@ def install(options: Optional[InstallOptions] = None) -> int:
|
|
|
1400
1421
|
if options.desktop or options.app_menu:
|
|
1401
1422
|
if system == "Linux" and options.system:
|
|
1402
1423
|
# pyshortcuts only writes per-user locations
|
|
1403
|
-
write_linux_system_desktop_entry(full_command, icon_path)
|
|
1424
|
+
if not write_linux_system_desktop_entry(full_command, icon_path):
|
|
1425
|
+
return 1
|
|
1404
1426
|
if options.desktop:
|
|
1405
1427
|
print(
|
|
1406
1428
|
"Note: Desktop shortcuts are per-user; "
|
|
@@ -1434,7 +1456,8 @@ def install(options: Optional[InstallOptions] = None) -> int:
|
|
|
1434
1456
|
)
|
|
1435
1457
|
|
|
1436
1458
|
if system == "Linux" and options.file_assoc:
|
|
1437
|
-
register_file_associations_linux(system=options.system)
|
|
1459
|
+
if not register_file_associations_linux(system=options.system):
|
|
1460
|
+
return 1
|
|
1438
1461
|
|
|
1439
1462
|
elif system == "Darwin":
|
|
1440
1463
|
if not (options.desktop or options.app_menu):
|
|
@@ -1478,8 +1501,8 @@ def install(options: Optional[InstallOptions] = None) -> int:
|
|
|
1478
1501
|
"moleditpy is installed (e.g. after 'conda activate <env>')."
|
|
1479
1502
|
)
|
|
1480
1503
|
|
|
1481
|
-
mac_escaped_script = mac_target_script.replace('"', '\\"')
|
|
1482
|
-
|
|
1504
|
+
mac_escaped_script = mac_target_script.replace("\\", "\\\\").replace('"', '\\"')
|
|
1505
|
+
mac_escaped_exe = original_exe_path.replace("\\", "\\\\").replace('"', '\\"')
|
|
1483
1506
|
|
|
1484
1507
|
# Run MoleditPy inside a Terminal window so Python output and
|
|
1485
1508
|
# errors are always visible to the user (a silent GUI launch
|
|
@@ -1488,7 +1511,7 @@ def install(options: Optional[InstallOptions] = None) -> int:
|
|
|
1488
1511
|
# away instead of staying "running" in the Dock.
|
|
1489
1512
|
applescript_code = f"""
|
|
1490
1513
|
on launch_moleditpy(extra_args)
|
|
1491
|
-
set base_cmd to quoted form of "{mac_escaped_script}" & " {
|
|
1514
|
+
set base_cmd to quoted form of "{mac_escaped_script}" & " " & quoted form of "{mac_escaped_exe}"
|
|
1492
1515
|
tell application "Terminal"
|
|
1493
1516
|
activate
|
|
1494
1517
|
do script base_cmd & extra_args
|
|
@@ -1566,7 +1589,9 @@ end open
|
|
|
1566
1589
|
shutil.copy2(icon_path, app_resources / "applet.icns")
|
|
1567
1590
|
|
|
1568
1591
|
if options.file_assoc:
|
|
1569
|
-
register_file_associations_darwin(target_app_path)
|
|
1592
|
+
if not register_file_associations_darwin(target_app_path):
|
|
1593
|
+
print("Failed to configure the app bundle's file association.")
|
|
1594
|
+
return 1
|
|
1570
1595
|
|
|
1571
1596
|
# Re-sign AFTER all bundle modifications, or Apple Silicon
|
|
1572
1597
|
# refuses to launch the app (silently from Finder).
|
|
@@ -1627,9 +1652,10 @@ end open
|
|
|
1627
1652
|
if not file_icon_path:
|
|
1628
1653
|
file_icon_path = icon_path
|
|
1629
1654
|
|
|
1630
|
-
register_file_associations_windows(
|
|
1655
|
+
if not register_file_associations_windows(
|
|
1631
1656
|
str(original_exe_path), file_icon_path, system=options.system
|
|
1632
|
-
)
|
|
1657
|
+
):
|
|
1658
|
+
return 1
|
|
1633
1659
|
|
|
1634
1660
|
print("\nYou can remove the shortcut and file associations by running:")
|
|
1635
1661
|
print(" moleditpy-installer --remove")
|
|
@@ -136,6 +136,7 @@ class InstallerApp(App):
|
|
|
136
136
|
self._show_uninstall_note = False
|
|
137
137
|
self._action_started = False
|
|
138
138
|
self._action_succeeded = False
|
|
139
|
+
self._busy = False
|
|
139
140
|
|
|
140
141
|
def compose(self) -> ComposeResult:
|
|
141
142
|
yield Header()
|
|
@@ -191,14 +192,14 @@ class InstallerApp(App):
|
|
|
191
192
|
)
|
|
192
193
|
|
|
193
194
|
def _set_busy(self, busy: bool) -> None:
|
|
194
|
-
|
|
195
|
+
self._busy = busy
|
|
196
|
+
for button_id in ("install", "remove", "quit"):
|
|
195
197
|
self.query_one(f"#{button_id}", Button).disabled = busy
|
|
196
198
|
|
|
197
199
|
def _detect_executable(self) -> None:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
path = installer.find_executable("moleditpy-linux")
|
|
200
|
+
path = installer.find_executable("moleditpy", quiet=True)
|
|
201
|
+
if not path and platform.system() == "Linux":
|
|
202
|
+
path = installer.find_executable("moleditpy-linux", quiet=True)
|
|
202
203
|
if path:
|
|
203
204
|
self.call_from_thread(self._set_detect_status, f"Found moleditpy: {path}")
|
|
204
205
|
else:
|
|
@@ -247,6 +248,8 @@ class InstallerApp(App):
|
|
|
247
248
|
# ------------------------------------------------------------------ #
|
|
248
249
|
|
|
249
250
|
def action_install(self) -> None:
|
|
251
|
+
if self._busy:
|
|
252
|
+
return
|
|
250
253
|
options = self._selected_options()
|
|
251
254
|
self._action_started = True
|
|
252
255
|
self._set_busy(True)
|
|
@@ -268,6 +271,8 @@ class InstallerApp(App):
|
|
|
268
271
|
)
|
|
269
272
|
|
|
270
273
|
def action_remove(self) -> None:
|
|
274
|
+
if self._busy:
|
|
275
|
+
return
|
|
271
276
|
system_scope = self.query_one("#scope_system", RadioButton).value
|
|
272
277
|
self._action_started = True
|
|
273
278
|
self._set_busy(True)
|
|
@@ -307,11 +312,12 @@ class InstallerApp(App):
|
|
|
307
312
|
elif event.button.id == "remove":
|
|
308
313
|
self.action_remove()
|
|
309
314
|
elif event.button.id == "quit":
|
|
310
|
-
self.
|
|
315
|
+
self.action_quit()
|
|
311
316
|
|
|
312
317
|
def action_quit(self) -> None:
|
|
313
318
|
# Match the Quit button: keep the exit code of a failed action.
|
|
314
|
-
self.
|
|
319
|
+
if not self._busy:
|
|
320
|
+
self.exit(self.exit_code)
|
|
315
321
|
|
|
316
322
|
|
|
317
323
|
def run_tui() -> int:
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moleditpy-installer
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Installer and application bundler for MoleditPy
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -687,14 +687,12 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
687
687
|
Classifier: Intended Audience :: Science/Research
|
|
688
688
|
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
689
689
|
Classifier: Operating System :: OS Independent
|
|
690
|
-
Requires-Python:
|
|
690
|
+
Requires-Python: <3.15,>=3.9
|
|
691
691
|
Description-Content-Type: text/markdown
|
|
692
692
|
License-File: LICENSE
|
|
693
693
|
Requires-Dist: pyshortcuts>=1.0.0
|
|
694
694
|
Requires-Dist: textual>=0.86
|
|
695
|
-
Requires-Dist: moleditpy
|
|
696
|
-
Requires-Dist: moleditpy; sys_platform == "win32"
|
|
697
|
-
Requires-Dist: moleditpy; sys_platform == "darwin"
|
|
695
|
+
Requires-Dist: moleditpy<6,>=5.0.0a1
|
|
698
696
|
Provides-Extra: test
|
|
699
697
|
Requires-Dist: pytest>=7.0; extra == "test"
|
|
700
698
|
Requires-Dist: pytest-mock>=3.0; extra == "test"
|
|
@@ -707,23 +705,36 @@ Dynamic: license-file
|
|
|
707
705
|
[](https://pypi.org/project/moleditpy-installer/)
|
|
708
706
|
[](https://pypi.org/project/moleditpy-installer/)
|
|
709
707
|
|
|
710
|
-
This package is a helper utility that
|
|
708
|
+
This package is a helper utility that installs the unified MoleditPy 5 package on every supported OS, creates an application menu shortcut, and registers the `.pmeprj` double-click file association on Windows, macOS, and Linux.
|
|
711
709
|
|
|
712
710
|

|
|
713
711
|
|
|
712
|
+
## Quick start and command choice
|
|
713
|
+
|
|
714
|
+
Use a dedicated virtual environment, or activate the environment where MoleditPy should live. See the [Windows/macOS/Linux quick start](https://github.com/HiroYokoyama/python_molecular_editor/wiki/Quick-Start) for commands that use an explicit environment path.
|
|
715
|
+
|
|
716
|
+
```bash
|
|
717
|
+
python -m pip install moleditpy-installer
|
|
718
|
+
python -m moleditpy_installer
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
Both `python -m moleditpy_installer` and `moleditpy-installer` are supported. **Prefer the module form**: it runs under the Python you selected and avoids depending on the console script being on `PATH`. If `python` is not your environment's interpreter, substitute its full path (or `python3` on macOS/Linux outside an activated environment). Use that same interpreter for `-m pip`.
|
|
722
|
+
|
|
723
|
+
Installing the package installs the app dependency. Running the installer configures launchers and file associations. For a non-interactive setup use `python -m moleditpy_installer --no-tui`; to inspect discovery first use `python -m moleditpy_installer --check`. The standalone Windows/macOS download is a separate distribution with different plugin-dependency limitations.
|
|
724
|
+
|
|
714
725
|
## How to Use
|
|
715
726
|
|
|
716
727
|
1. **Install**
|
|
717
728
|
```bash
|
|
718
|
-
pip install moleditpy-installer
|
|
729
|
+
python -m pip install moleditpy-installer
|
|
719
730
|
```
|
|
720
|
-
This
|
|
731
|
+
This installs the unified MoleditPy 5 package as a dependency. Python 3.9 through 3.14 is supported. The helper creates shortcuts and file associations; it does not build a frozen application.
|
|
721
732
|
|
|
722
733
|
2. **Run the interactive installer (TUI)**
|
|
723
734
|
Run the following command in your terminal. In an interactive terminal this opens a TUI where you pick the components — Desktop shortcut, application-menu entry, `.pmeprj` file association — and the scope (per-user or system-wide), then press **Install**:
|
|
724
735
|
|
|
725
736
|
```bash
|
|
726
|
-
|
|
737
|
+
python -m moleditpy_installer
|
|
727
738
|
```
|
|
728
739
|
|
|
729
740
|
Defaults: Desktop shortcut **off**, application menu **on**, file association **on**, per-user scope, executable **auto-detected**. The **Executable path** field at the bottom of the panel is optional — leave it empty to auto-detect, or type the path to the `moleditpy` executable (or the `Scripts`/`bin` folder holding it) when your installation lives somewhere the search does not cover. The **Install** button is focused on start, so pressing **Enter** immediately installs with the defaults. Move between widgets with **Tab** / **Shift+Tab** (the arrow keys also switch between the Install / Uninstall / Quit buttons). After a successful install or uninstall the TUI stays open for two seconds, then exits and replays the full log in the terminal.
|
|
@@ -731,11 +742,11 @@ This package is a helper utility that automatically installs the correct version
|
|
|
731
742
|
**Non-interactive / scripted use** (also what runs automatically when there is no terminal):
|
|
732
743
|
|
|
733
744
|
```bash
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
sudo
|
|
738
|
-
|
|
745
|
+
python -m moleditpy_installer --no-tui # install with the defaults
|
|
746
|
+
python -m moleditpy_installer --desktop # also create a Desktop shortcut
|
|
747
|
+
python -m moleditpy_installer --no-file-assoc # skip the .pmeprj association
|
|
748
|
+
sudo /absolute/path/to/env/bin/python -m moleditpy_installer --system # system-wide (admin terminal on Windows)
|
|
749
|
+
python -m moleditpy_installer --exe-path /opt/env/bin/moleditpy # point at the executable yourself
|
|
739
750
|
```
|
|
740
751
|
|
|
741
752
|
Any explicit option skips the TUI.
|
|
@@ -743,21 +754,21 @@ This package is a helper utility that automatically installs the correct version
|
|
|
743
754
|
**Manual executable path.** If the automatic search cannot find your installation, pass `--exe-path` (or fill in the TUI field). It accepts the executable itself or the directory holding it, expands `~` and environment variables, and strips surrounding quotes:
|
|
744
755
|
|
|
745
756
|
```bash
|
|
746
|
-
|
|
747
|
-
|
|
757
|
+
python -m moleditpy_installer --exe-path "~/my envs/chem/bin" # a Scripts/bin directory
|
|
758
|
+
python -m moleditpy_installer --check --exe-path C:\envs\chem\Scripts\moleditpy.exe
|
|
748
759
|
```
|
|
749
760
|
|
|
750
761
|
A path given this way is never silently replaced by a search result: if it is wrong, the installer reports why and stops.
|
|
751
762
|
|
|
752
763
|
> **Security Note:** File associations for `.pmeraw` files have been intentionally removed. Opening `.pmeraw` files downloaded from the internet can be potentially unsecure, so they are no longer automatically associated with the application.
|
|
753
764
|
|
|
754
|
-
|
|
765
|
+
The console-script alternative is also supported when its Scripts/bin directory is on `PATH`:
|
|
755
766
|
|
|
756
767
|
```bash
|
|
757
|
-
|
|
768
|
+
moleditpy-installer
|
|
758
769
|
```
|
|
759
770
|
|
|
760
|
-
> **Note:** `python -m moleditpy-installer` (with a hyphen)
|
|
771
|
+
> **Note:** `python -m moleditpy-installer` (with a hyphen) does not name this package’s Python module and will not work. Always use the underscore form (`moleditpy_installer`) with `-m`.
|
|
761
772
|
|
|
762
773
|
> **Tip:** Run the installer from the Python environment where `moleditpy` is installed (e.g. after `conda activate <env>`). The installer verifies the launch command and warns you if the pairing cannot start MoleditPy.
|
|
763
774
|
|
|
@@ -765,18 +776,18 @@ This package is a helper utility that automatically installs the correct version
|
|
|
765
776
|
To remove the shortcuts, unregister file associations, and clean up extracted icon files, run (add `--system` for a system-wide install; `--remove` remains as a deprecated alias):
|
|
766
777
|
|
|
767
778
|
```bash
|
|
768
|
-
moleditpy-installer --uninstall
|
|
769
|
-
# or
|
|
770
779
|
python -m moleditpy_installer --uninstall
|
|
780
|
+
# or, if the console script is on PATH
|
|
781
|
+
moleditpy-installer --uninstall
|
|
771
782
|
```
|
|
772
783
|
|
|
773
|
-
> **Note:** this removes the shortcuts and file associations only. To fully remove MoleditPy itself, also run `
|
|
784
|
+
> **Note:** this removes the shortcuts and file associations only. To fully remove MoleditPy itself, also run `python -m pip uninstall moleditpy`.
|
|
774
785
|
|
|
775
786
|
4. **Check Executable Location**
|
|
776
787
|
To search for the `moleditpy` executable in the search paths and print the located path:
|
|
777
788
|
|
|
778
789
|
```bash
|
|
779
|
-
|
|
790
|
+
python -m moleditpy_installer --check
|
|
780
791
|
```
|
|
781
792
|
This command returns exit code `0` if the executable is found, and `1` otherwise. On macOS it additionally verifies that the launcher's interpreter/script pairing can actually start MoleditPy. Add `--exe-path <path>` to validate a specific location instead of searching.
|
|
782
793
|
|
|
@@ -786,14 +797,14 @@ This package is a helper utility that automatically installs the correct version
|
|
|
786
797
|
To show the version of the installer:
|
|
787
798
|
|
|
788
799
|
```bash
|
|
789
|
-
|
|
800
|
+
python -m moleditpy_installer --version
|
|
790
801
|
```
|
|
791
802
|
|
|
792
803
|
6. **Help**
|
|
793
804
|
To see all available options, run:
|
|
794
805
|
|
|
795
806
|
```bash
|
|
796
|
-
|
|
807
|
+
python -m moleditpy_installer --help
|
|
797
808
|
```
|
|
798
809
|
|
|
799
810
|
## What the installer sets up
|
|
@@ -817,6 +828,15 @@ This package is a helper utility that automatically installs the correct version
|
|
|
817
828
|
|
|
818
829
|
`moleditpy-installer --uninstall` undoes all of the above for the current user (add `--system` for system-wide installs).
|
|
819
830
|
|
|
831
|
+
## Version 3.1.3 fixes
|
|
832
|
+
|
|
833
|
+
- Report failed file-association and Linux system-launcher setup correctly.
|
|
834
|
+
- Serialize TUI actions and preserve logging while background discovery runs.
|
|
835
|
+
- Preserve other Linux MIME handlers during uninstall and prefer the active virtual environment during discovery.
|
|
836
|
+
- Quote macOS launcher paths safely and validate release tags against package metadata.
|
|
837
|
+
|
|
838
|
+
See [the changelog](https://github.com/HiroYokoyama/python_molecular_editor_installer/blob/main/CHANGELOG.md) for details.
|
|
839
|
+
|
|
820
840
|
## Version 3.1 highlights
|
|
821
841
|
|
|
822
842
|
- **New:** manual executable path — `--exe-path` on the command line and an **Executable path** field in the TUI, for installations the automatic search cannot find. Accepts the executable or the directory holding it; a wrong path is reported instead of being silently replaced by a search result.
|
|
@@ -842,3 +862,5 @@ This package is a helper utility that automatically installs the correct version
|
|
|
842
862
|
- **New:** `.pmeprj` double-click support and document icon on Linux (per-user MIME registration).
|
|
843
863
|
- **New:** `--check` verifies launchability on macOS; `--remove` also unregisters the bundle from Launch Services and removes extracted icons.
|
|
844
864
|
- Icons no longer live in the temp folder (Windows shortcut/registry icons no longer break after cleanup).
|
|
865
|
+
|
|
866
|
+
Replace `/absolute/path/to/env/bin/python` with the actual environment interpreter for a system-wide Unix install. On Windows, use the intended environment’s Python from an administrator terminal.
|
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "moleditpy-installer"
|
|
7
|
-
version = "
|
|
7
|
+
version = "4.0.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="HiroYokoyama", email="titech.yoko.hiro@gmail.com" },
|
|
10
10
|
]
|
|
11
11
|
description = "Installer and application bundler for MoleditPy"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
license = {file = "LICENSE"}
|
|
14
|
-
requires-python = ">=3.9"
|
|
14
|
+
requires-python = ">=3.9, <3.15"
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Programming Language :: Python :: 3",
|
|
17
17
|
"Programming Language :: Python :: 3.9",
|
|
@@ -27,9 +27,7 @@ classifiers = [
|
|
|
27
27
|
dependencies = [
|
|
28
28
|
"pyshortcuts >= 1.0.0",
|
|
29
29
|
"textual >= 0.86",
|
|
30
|
-
"moleditpy
|
|
31
|
-
"moleditpy; sys_platform == 'win32'",
|
|
32
|
-
"moleditpy; sys_platform == 'darwin'",
|
|
30
|
+
"moleditpy >= 5.0.0a1, < 6",
|
|
33
31
|
]
|
|
34
32
|
|
|
35
33
|
[project.optional-dependencies]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon.icns
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon.ico
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_128.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_16.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_22.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_24.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_32.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_48.png
RENAMED
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer/data/file_icon_64.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_installer-3.1.2 → moleditpy_installer-4.0.0}/moleditpy_installer.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|