Skip to content

Commit

Permalink
Fix GUI entry point on Windows and remove CLI-specific entry point
Browse files Browse the repository at this point in the history
- Change the GUI entry point from `gui_scripts` to `console_scripts` because of a TraitsUI crash when using the former (see enthought/traitsui#1032, enthought/traitsui#1038)
- For simplicity, remove the `mm-cli` entry point since the `mm` entry-point also accesses the CLI when running as a `console_scripts` entry point
  • Loading branch information
yoda-vid committed Aug 25, 2022
1 parent 8c9a4a3 commit d99c233
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ If you use Conda (available [here](https://docs.conda.io/en/latest/miniconda.htm
conda env create -n mag -f https://raw.githubusercontent.com/sanderslab/magellanmapper/master/envs/environment_rel.yml
```

To run in this new environment named `mag`:
To run in this new environment named `mag`[^\*]:

```shell
conda activate mag
mm
```

[^\*]: `mm` was added in v1.6.0 to launch from installed packages. When installed [from source](docs/install.md#developer-installs), `python run.py` still works!

Or install using Pip (virtual environment [recommended](https://realpython.com/python-virtual-environments-a-primer/)):

```shell
Expand Down
8 changes: 1 addition & 7 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ mm

Conda will also install Java, which we use to read proprietary image formats.

For non-graphical tasks, enter the CLI through:

```shell
mm-cli
```

The `mm` and `mm-cli` entry points were added in v1.6.0 to facilitate launching from installed packages.
The `mm` entry points was added in v1.6.0 to facilitate launching from installed packages.

### Install using Pip

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"scripts": [],
"python_requires": ">=3.6",
"entry_points": {
"console_scripts": ["mm-cli = magmap.io.cli:main"],
"gui_scripts": ["mm = magmap.io.load_env:launch_magmap"],
# gui_scripts doesn't load because of TraitsUI issue #1032
"console_scripts": ["mm = magmap.io.load_env:launch_magmap"],
},
"install_requires": [
"scikit-image",
Expand Down

0 comments on commit d99c233

Please sign in to comment.