Skip to content

Commit

Permalink
installer: GUI no longer default enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwer committed Feb 5, 2025
1 parent d9f8c71 commit d286ec7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
10 changes: 7 additions & 3 deletions ManifoldEM/interfaces/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@

from argparse import ArgumentParser

from PyQt5 import QtCore
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QApplication
try:
from PyQt5 import QtCore
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QApplication
except ImportError:
print("PyQt5 not found. Did you install ManifoldEM with the [gui] option? Consult the README for more information.")
sys.exit(1)

import ManifoldEM

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ resources may prove useful for a review of ManifoldEM history, theory and implem

## Installation
Should be installable in any modern python/conda environment (python 3.9+, though `mayavi` and
`pyqt` packages don't always immediately work with the most recent version of python).
`pyqt` packages don't always immediately work with the most recent version of python). If you don't
need the gui, feel free to omit the "[gui]" part of the install command!

python:
```bash
Expand All @@ -38,7 +39,7 @@ python3 -m venv ~/envs/manifoldem
source ~/envs/manifoldem/bin/activate

pip install --upgrade pip
pip install "git+ssh://[email protected]/flatironinstitute/ManifoldEM"
pip install "git+ssh://[email protected]/flatironinstitute/ManifoldEM[gui]"

manifold-gui
```
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ dependencies = [
"nptyping",
"numpy",
"numba",
"mayavi",
"PyQt5",
"psutil",
"matplotlib",
"scikit-image",
Expand All @@ -66,6 +64,12 @@ dependencies = [
"fasthog",
]

[project.optional-dependencies]
gui = [
"mayavi",
"PyQt5",
]

[project.scripts]
manifold-cli = "ManifoldEM.interfaces.cli:main"
manifold-gui = "ManifoldEM.interfaces.gui:main"
Expand Down

0 comments on commit d286ec7

Please sign in to comment.