Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dicom-upload
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
jupyter4jsc
j4j_extras
dicom-upload
Commits
c75f2cf0
Commit
c75f2cf0
authored
5 years ago
by
alice grosch
Browse files
Options
Downloads
Patches
Plain Diff
Update setup.py with long descripton
parent
51430f77
Branches
Branches containing commit
Tags
0.1.3
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+21
-14
21 additions, 14 deletions
setup.py
with
21 additions
and
14 deletions
setup.py
+
21
−
14
View file @
c75f2cf0
...
@@ -22,7 +22,9 @@ log.set_verbosity(log.DEBUG)
...
@@ -22,7 +22,9 @@ log.set_verbosity(log.DEBUG)
log
.
info
(
'
setup.py entered
'
)
log
.
info
(
'
setup.py entered
'
)
log
.
info
(
'
$PATH=%s
'
%
os
.
environ
[
'
PATH
'
])
log
.
info
(
'
$PATH=%s
'
%
os
.
environ
[
'
PATH
'
])
LONG_DESCRIPTION
=
'
Upload DICOM files with patient und study data removed from header
'
with
open
(
os
.
path
.
join
(
here
,
'
README.md
'
),
encoding
=
'
utf-8
'
)
as
f
:
LONG_DESCRIPTION
=
f
.
read
()
def
js_prerelease
(
command
,
strict
=
False
):
def
js_prerelease
(
command
,
strict
=
False
):
"""
decorator for building minified js/css prior to another command
"""
"""
decorator for building minified js/css prior to another command
"""
...
@@ -50,6 +52,7 @@ def js_prerelease(command, strict=False):
...
@@ -50,6 +52,7 @@ def js_prerelease(command, strict=False):
update_package_data
(
self
.
distribution
)
update_package_data
(
self
.
distribution
)
return
DecoratedCommand
return
DecoratedCommand
def
update_package_data
(
distribution
):
def
update_package_data
(
distribution
):
"""
update package_data to catch changes during setup
"""
"""
update package_data to catch changes during setup
"""
build_py
=
distribution
.
get_command_obj
(
'
build_py
'
)
build_py
=
distribution
.
get_command_obj
(
'
build_py
'
)
...
@@ -77,14 +80,14 @@ class NPM(Command):
...
@@ -77,14 +80,14 @@ class NPM(Command):
pass
pass
def
get_npm_name
(
self
):
def
get_npm_name
(
self
):
npmName
=
'
npm
'
;
npmName
=
'
npm
'
if
platform
.
system
()
==
'
Windows
'
:
if
platform
.
system
()
==
'
Windows
'
:
npmName
=
'
npm.cmd
'
;
npmName
=
'
npm.cmd
'
return
npmName
;
return
npmName
def
has_npm
(
self
):
def
has_npm
(
self
):
npmName
=
self
.
get_npm_name
()
;
npmName
=
self
.
get_npm_name
()
try
:
try
:
check_call
([
npmName
,
'
--version
'
])
check_call
([
npmName
,
'
--version
'
])
return
True
return
True
...
@@ -99,15 +102,18 @@ class NPM(Command):
...
@@ -99,15 +102,18 @@ class NPM(Command):
def
run
(
self
):
def
run
(
self
):
has_npm
=
self
.
has_npm
()
has_npm
=
self
.
has_npm
()
if
not
has_npm
:
if
not
has_npm
:
log
.
error
(
"
`npm` unavailable. If you
'
re running this command using sudo, make sure `npm` is available to sudo
"
)
log
.
error
(
"
`npm` unavailable. If you
'
re running this command using sudo, make sure `npm` is available to sudo
"
)
env
=
os
.
environ
.
copy
()
env
=
os
.
environ
.
copy
()
env
[
'
PATH
'
]
=
npm_path
env
[
'
PATH
'
]
=
npm_path
if
self
.
should_run_npm_install
():
if
self
.
should_run_npm_install
():
log
.
info
(
"
Installing build dependencies with npm. This may take a while...
"
)
log
.
info
(
npmName
=
self
.
get_npm_name
();
"
Installing build dependencies with npm. This may take a while...
"
)
check_call
([
npmName
,
'
install
'
],
cwd
=
node_root
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
)
npmName
=
self
.
get_npm_name
()
check_call
([
npmName
,
'
install
'
],
cwd
=
node_root
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
)
os
.
utime
(
self
.
node_modules
,
None
)
os
.
utime
(
self
.
node_modules
,
None
)
for
t
in
self
.
targets
:
for
t
in
self
.
targets
:
...
@@ -120,6 +126,7 @@ class NPM(Command):
...
@@ -120,6 +126,7 @@ class NPM(Command):
# update package data in case this created new files
# update package data in case this created new files
update_package_data
(
self
.
distribution
)
update_package_data
(
self
.
distribution
)
version_ns
=
{}
version_ns
=
{}
with
open
(
os
.
path
.
join
(
here
,
'
dicom_upload
'
,
'
_version.py
'
))
as
f
:
with
open
(
os
.
path
.
join
(
here
,
'
dicom_upload
'
,
'
_version.py
'
))
as
f
:
exec
(
f
.
read
(),
{},
version_ns
)
exec
(
f
.
read
(),
{},
version_ns
)
...
@@ -150,7 +157,7 @@ setup_args = {
...
@@ -150,7 +157,7 @@ setup_args = {
'
jsdeps
'
:
NPM
,
'
jsdeps
'
:
NPM
,
},
},
'
author
'
:
'
Alice Grosch
'
,
'
author
'
:
'
Juelich Supercomputing Centre (JSC)
'
,
'
author_email
'
:
'
a.grosch@fz-juelich.de
'
,
'
author_email
'
:
'
a.grosch@fz-juelich.de
'
,
'
url
'
:
'
https://github.com/jsc/dicom-upload
'
,
'
url
'
:
'
https://github.com/jsc/dicom-upload
'
,
'
keywords
'
:
[
'
keywords
'
:
[
...
...
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