Skip to content

Commit

Permalink
Fix issues with packaging for pip
Browse files Browse the repository at this point in the history
  • Loading branch information
jfischer committed Mar 8, 2019
1 parent cf3a809 commit 1075191
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 38 deletions.
2 changes: 1 addition & 1 deletion dataworkspaces/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright 2018,2019 by MPI-SWS and Data-ken Research. Licensed under Apache 2.0. See LICENSE.txt.

__version__ = '0.8.0'
__version__ = '0.8.3'
66 changes: 33 additions & 33 deletions dataworkspaces/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,41 @@

from .dws import cli, is_verbose_mode


try:
cli()
sys.exit(0)
except CalledProcessError as e:
click.echo(e.stdout)
click.echo(e.stderr)
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Error in subprocess call. Command was:\n %s" % e.cmd, err=True)
sys.exit(1)
except UserAbort as e:
click.echo("Not a positive response, exiting without doing anything", err=True)
sys.exit(1)
except ConfigurationError as e:
if is_verbose_mode():
def main():
try:
cli()
sys.exit(0)
except CalledProcessError as e:
click.echo(e.stdout)
click.echo(e.stderr)
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Error in subprocess call. Command was:\n %s" % e.cmd, err=True)
sys.exit(1)
except UserAbort as e:
click.echo("Not a positive response, exiting without doing anything", err=True)
sys.exit(1)
except ConfigurationError as e:
if is_verbose_mode():
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Configuration error: " + str(e), err=True)
sys.exit(1)
except BatchModeError as e:
if is_verbose_mode():
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Running in --batch mode, but user input required for %s"%
str(e), err=True)
sys.exit(1)
except InternalError as e:
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Configuration error: " + str(e), err=True)
sys.exit(1)
except BatchModeError as e:
if is_verbose_mode():
click.echo("Aborting due to internal error: %s" % str(e), err=True)
sys.exit(1)
except Exception as e:
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Running in --batch mode, but user input required for %s"%
str(e), err=True)
sys.exit(1)
except InternalError as e:
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Aborting due to internal error: %s" % str(e), err=True)
sys.exit(1)
except Exception as e:
tb = traceback.format_exc()
click.echo(tb, err=True)
click.echo("Aborting due to unexpected exception: %s" % repr(e), err=True)
sys.exit(1)
click.echo("Aborting due to unexpected exception: %s" % repr(e), err=True)
sys.exit(1)

9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2018,2019 by MPI-SWS and Data-ken Research. Licensed under Apache 2.0. See LICENSE.txt.
from setuptools import setup
from setuptools import setup, find_packages

import sys
sys.path.insert(0, 'dataworkspaces')
Expand All @@ -16,14 +16,15 @@
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://github.com/data-workspaces/data-workspaces-core",
py_modules=['dataworkspaces'],
packages=find_packages(),
#py_modules=['dataworkspaces'],
install_requires=[
'Click',
'click',
'requests'
],
entry_points="""
[console_scripts]
dws=dataworkspaces.__main__
dws=dataworkspaces.__main__:main
git-fat=dataworkspaces.third_party.git_fat:main
""",
classifiers=[
Expand Down

0 comments on commit 1075191

Please sign in to comment.