Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evan Edmond
fslpy
Commits
e7a74aac
Commit
e7a74aac
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Working around pyinstaller/linux silliness.
parent
55b9a759
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/__init__.py
+15
-1
15 additions, 1 deletion
fsl/__init__.py
with
15 additions
and
1 deletion
fsl/__init__.py
+
15
−
1
View file @
e7a74aac
...
...
@@ -192,7 +192,21 @@ def runTool(toolName, args, **kwargs):
def
_getFSLToolNames
():
"""
Returns the name of every tool in the :mod:`fsl.tools` package.
"""
allTools
=
[
mod
for
_
,
mod
,
_
in
pkgutil
.
iter_modules
(
tools
.
__path__
)]
# Under linux/Pyinstaller 3.1, iter_modules
# doesn't seem to work, even if i include
# the source code in the frozen app directory.
# So i'm hard coding the names of the tool
# modules.
#
# A workaround would be to manually glob the
# fsl/tools/ directory which, if I continue
# to add the source code to the frozen app
# directory, should work for both frozen and
# unfrozen apps.
if
getattr
(
sys
,
'
frozen
'
,
False
):
allTools
=
[
'
fsleyes
'
,
'
render
'
,
'
bet
'
,
'
flirt
'
,
'
feat
'
]
else
:
allTools
=
[
mod
for
_
,
mod
,
_
in
pkgutil
.
iter_modules
(
tools
.
__path__
)]
return
allTools
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment