Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
docs
Commits
dfa7e96f
Commit
dfa7e96f
authored
Jan 18, 2021
by
Paul McCarthy
🚵
Browse files
ENH: Example python project/recipe
parent
f8f62fa8
Changes
6
Hide whitespace changes
Inline
Side-by-side
examples/python/example_python_project/example_package/__init__.py
0 → 100644
View file @
dfa7e96f
examples/python/example_python_project/example_package/main.py
0 → 100644
View file @
dfa7e96f
#!/usr/bin/env python
import
os.path
as
op
import
sys
def
main
():
scriptname
=
op
.
basename
(
sys
.
argv
[
0
])
if
len
(
sys
.
argv
)
!=
2
:
print
(
f
'Usage:
{
scriptname
}
name'
)
sys
.
exit
(
1
)
print
(
f
'Hello,
{
sys
.
argv
[
1
]
}
'
)
if
__name__
==
'__main__'
:
main
()
examples/python/example_python_project/setup.py
0 → 100644
View file @
dfa7e96f
#!/usr/bin/env python
from
setuptools
import
setup
setup
(
name
=
'example_python_project'
,
version
=
'0.0.1'
,
description
=
'Example FSL Python project'
,
author
=
'Paul McCarthy'
,
install_requires
=
[
'numpy'
,
'nibabel'
],
packages
=
[
'example_package'
],
entry_points
=
{
'console_scripts'
:
[
'example_python_exe = example_package.main:main'
,
]
}
)
examples/python/fsl-example_python_project/meta.yaml
0 → 100644
View file @
dfa7e96f
# This is a FSL conda recipe for: example_python_project
# The project git repository is: https://git.fmrib.ox.ac.uk/fsl/example_python_project
# The git repository for this conda recipe is: https://git.fmrib.ox.ac.uk/fsl/conda/fsl-example_python_project
{
%
set name = fsl-example_python_project %
}
{
%
set version = 0.0.1 %
}
{
%
set repository = https
:
//git.fmrib.ox.ac.uk/fsl/example_cpp_project %
}
{
%
set build = '0' %
}
package
:
name
:
{{
name
}}
version
:
{{
version
}}
source
:
# the FSLCONDA_REPOSITORY and FSLCONDA_REVISION
# environment variables can be used to override
# the repository/revision for development purposes.
git_url
:
{{
'
{{
os.environ.get("FSLCONDA_REPOSITORY",
repository)
}}'
}}
git_rev
:
{{
'
{{
os.environ.get("FSLCONDA_REVISION",
version)
}}'
}}
build
:
number
:
{{
build
}}
noarch
:
python
script
:
{{
PYTHON
}}
-m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
requirements
:
host
:
-
python
-
pip
build
:
-
setuptools
-
wheel
run
- fsl-base >=2012.0
- nibabel
- numpy
examples/python/fsl-example_python_project/post-link.sh
0 → 100644
View file @
dfa7e96f
if
[
-e
${
FSLDIR
}
/share/fsl/sbin/createFSLWrapper
]
;
then
${
FSLDIR
}
/share/fsl/sbin/createFSLWrapper example_python_exe
fi
examples/python/fsl-example_python_project/pre-unlink.sh
0 → 100644
View file @
dfa7e96f
if
[
-e
${
FSLDIR
}
/share/fsl/sbin/removeFSLWrapper
]
;
then
${
FSLDIR
}
/share/fsl/sbin/removeFSLWrapper example_python_exe
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment