Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
a40f4f0c
Commit
a40f4f0c
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
fslpy is now apache2
parent
e3e4ccb5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
COPYRIGHT
+1
-0
1 addition, 0 deletions
COPYRIGHT
LICENSE
+10
-59
10 additions, 59 deletions
LICENSE
setup.py
+5
-86
5 additions, 86 deletions
setup.py
with
16 additions
and
145 deletions
COPYRIGHT
0 → 100644
+
1
−
0
View file @
a40f4f0c
Copyright 2016-2017 University of Oxford, Oxford, UK
This diff is collapsed.
Click to expand it.
LICENSE
+
10
−
59
View file @
a40f4f0c
The fslpy library
Copyright 2016-2017 University of Oxford, Oxford, UK.
Part of FSL - FMRIB's Softwar
e Li
brary
http://www.fmrib.ox.ac.uk/fsl
fsl@fmrib.ox.ac.uk
Licensed under the Apache License, Version 2.0 (th
e
"
Li
cense");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
Imaging of the Brain), Department of Clinical Neurology, Oxford
University, Oxford, UK
http://www.apache.org/licenses/LICENSE-2.0
LICENCE
FMRIB Software Library, Release 5.0 (c) 2012, The University of
Oxford (the "Software")
The Software remains the property of the University of Oxford ("the
University").
The Software is distributed "AS IS" under this Licence solely for
non-commercial use in the hope that it will be useful, but in order
that the University as a charitable foundation protects its assets for
the benefit of its educational and research purposes, the University
makes clear that no condition is made or to be implied, nor is any
warranty given or to be implied, as to the accuracy of the Software,
or that it will be suitable for any particular purpose or for use
under any specific conditions. Furthermore, the University disclaims
all responsibility for the use which is made of the Software. It
further disclaims any liability for the outcomes arising from using
the Software.
The Licensee agrees to indemnify the University and hold the
University harmless from and against any and all claims, damages and
liabilities asserted by third parties (including claims for
negligence) which arise directly or indirectly from the use of the
Software or the sale of any products based on the Software.
No part of the Software may be reproduced, modified, transmitted or
transferred in any form or by any means, electronic or mechanical,
without the express permission of the University. The permission of
the University is not required if the said reproduction, modification,
transmission or transference is done without financial return, the
conditions of this Licence are imposed upon the receiver of the
product, and all original and amended source code is included in any
transmitted product. You may be held legally responsible for any
copyright infringement that is caused or encouraged by your failure to
abide by these terms and conditions.
You are not permitted under this Licence to use this Software
commercially. Use for which any financial return is received shall be
defined as commercial use, and includes (1) integration of all or part
of the source code or the Software into a product for sale or license
by or on behalf of Licensee to third parties or (2) use of the
Software or any derivative of it for research with the final aim of
developing software products for sale or license to a third party or
(3) use of the Software or any derivative of it for research with the
final aim of developing non-software products for sale or license to a
third party, or (4) use of the Software to provide any service to an
external organisation for which payment is received. If you are
interested in using the Software commercially, please contact Isis
Innovation Limited ("Isis"), the technology transfer company of the
University, to negotiate a licence. Contact details are:
Innovation@innovation.ox.ac.uk quoting reference DE/9564.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This diff is collapsed.
Click to expand it.
setup.py
+
5
−
86
View file @
a40f4f0c
...
...
@@ -5,88 +5,10 @@
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
import
os
import
os.path
as
op
from
setuptools
import
setup
from
setuptools
import
find_packages
from
setuptools.command.sdist
import
sdist
class
fsl_sdist
(
sdist
):
"""
Custom sdist command which inserts the LICENSE text at the
beginning of every source file.
"""
def
make_distribution
(
self
):
# Force distutils.command.sdist to copy
# files instead of hardlinking them. This
# hack is performed by setuptools >= 24.3.0,
# but is not done by earlier versions.
link
=
getattr
(
os
,
'
link
'
,
None
)
try
:
del
(
os
.
link
)
except
:
pass
sdist
.
make_distribution
(
self
)
if
link
is
not
None
:
os
.
link
=
link
def
make_release_tree
(
self
,
base_dir
,
files
):
# Make the release tree
sdist
.
make_release_tree
(
self
,
base_dir
,
files
)
licence
=
op
.
abspath
(
'
LICENSE
'
)
if
not
op
.
exists
(
licence
):
return
with
open
(
licence
,
'
rt
'
)
as
f
:
licence
=
f
.
read
()
patchfuncs
=
{
'
.py
'
:
self
.
__patch_py_file
,
}
# Walk through the release
# tree, and patch the license
# into every relevant file.
for
root
,
dirs
,
files
in
os
.
walk
(
base_dir
):
for
filename
in
files
:
filename
=
op
.
join
(
root
,
filename
)
ext
=
op
.
splitext
(
filename
)[
1
]
patchfunc
=
patchfuncs
.
get
(
ext
)
if
patchfunc
is
not
None
:
patchfunc
(
filename
,
licence
)
def
__patch_py_file
(
self
,
filename
,
licence
):
licence
=
licence
.
split
(
'
\n
'
)
licence
=
[
'
# {0}
'
.
format
(
l
)
for
l
in
licence
]
with
open
(
filename
,
'
rt
'
)
as
f
:
lines
=
f
.
read
().
split
(
'
\n
'
)
# Remove any existing hashbang line
if
len
(
lines
)
>
0
and
lines
[
0
].
startswith
(
'
#!
'
):
lines
=
lines
[
1
:]
# Insert the fsl hashbang and the licence
lines
=
[
'
#!/usr/bin/env fslpython
'
]
+
[
'
#
'
]
+
licence
+
lines
lines
=
[
'
{0}
\n
'
.
format
(
l
)
for
l
in
lines
]
with
open
(
filename
,
'
wt
'
)
as
f
:
f
.
writelines
(
lines
)
from
setuptools
import
setup
from
setuptools
import
find_packages
# The directory in which this setup.py file is contained.
...
...
@@ -123,16 +45,16 @@ setup(
author_email
=
'
pauldmccarthy@gmail.com
'
,
license
=
'
FMRIB
'
,
license
=
'
Apache License Version 2.0
'
,
classifiers
=
[
'
Development Status :: 3 - Alpha
'
,
'
Intended Audience :: Developers
'
,
'
License ::
Free for non-commercial u
se
'
,
'
License ::
OSI Approved :: Apache Software Licen
se
'
,
'
Programming Language :: Python :: 2.7
'
,
'
Topic :: Software Development :: Libraries :: Python Modules
'
],
packages
=
find_packages
(
exclude
=
(
'
doc
'
)),
packages
=
find_packages
(
exclude
=
(
'
doc
'
,
'
tests
'
)),
install_requires
=
install_requires
,
dependency_links
=
dependency_links
,
...
...
@@ -141,9 +63,6 @@ setup(
tests_require
=
[
'
pytest
'
,
'
pytest-runner
'
],
test_suite
=
'
tests
'
,
cmdclass
=
{
'
fsl_sdist
'
:
fsl_sdist
},
entry_points
=
{
'
console_scripts
'
:
[
'
fslpy_imcp = fsl.scripts.imcp:main
'
,
...
...
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