Skip to content
Snippets Groups Projects
Commit c75f2cf0 authored by alice grosch's avatar alice grosch
Browse files

Update setup.py with long descripton

parent 51430f77
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,9 @@ log.set_verbosity(log.DEBUG)
log.info('setup.py entered')
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):
"""decorator for building minified js/css prior to another command"""
......@@ -50,6 +52,7 @@ def js_prerelease(command, strict=False):
update_package_data(self.distribution)
return DecoratedCommand
def update_package_data(distribution):
"""update package_data to catch changes during setup"""
build_py = distribution.get_command_obj('build_py')
......@@ -77,14 +80,14 @@ class NPM(Command):
pass
def get_npm_name(self):
npmName = 'npm';
npmName = 'npm'
if platform.system() == 'Windows':
npmName = 'npm.cmd';
npmName = 'npm.cmd'
return npmName;
return npmName
def has_npm(self):
npmName = self.get_npm_name();
npmName = self.get_npm_name()
try:
check_call([npmName, '--version'])
return True
......@@ -99,15 +102,18 @@ class NPM(Command):
def run(self):
has_npm = self.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['PATH'] = npm_path
if self.should_run_npm_install():
log.info("Installing build dependencies with npm. This may take a while...")
npmName = self.get_npm_name();
check_call([npmName, 'install'], cwd=node_root, stdout=sys.stdout, stderr=sys.stderr)
log.info(
"Installing build dependencies with npm. This may take a while...")
npmName = self.get_npm_name()
check_call([npmName, 'install'], cwd=node_root,
stdout=sys.stdout, stderr=sys.stderr)
os.utime(self.node_modules, None)
for t in self.targets:
......@@ -120,6 +126,7 @@ class NPM(Command):
# update package data in case this created new files
update_package_data(self.distribution)
version_ns = {}
with open(os.path.join(here, 'dicom_upload', '_version.py')) as f:
exec(f.read(), {}, version_ns)
......@@ -150,7 +157,7 @@ setup_args = {
'jsdeps': NPM,
},
'author': 'Alice Grosch',
'author': 'Juelich Supercomputing Centre (JSC)',
'author_email': 'a.grosch@fz-juelich.de',
'url': 'https://github.com/jsc/dicom-upload',
'keywords': [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment