Add a __main__ and an entrypoint
ADD
repo2docker/__main__.py
+from .app import Repo2Docker
+
+if __name__ == '__main__':
+ f = Repo2Docker()
+ f.run()

MODIFY
repo2docker/app.py
repo2docker/app.py
@@ -186,7 +186,3 @@ class Repo2Docker(Application):
shutil.rmtree(checkout_path)
-if __name__ == '__main__':
- f = Repo2Docker()
- f.initialize()
- f.run()

MODIFY
setup.py
setup.py
@@ -12,4 +12,9 @@ setup(
author_email='yuvipanda@gmail.com',
license='BSD',
packages=find_packages(),
+ entry_points={
+ 'console_scripts': [
+ 'jupyter-repo2docker = repo2docker.__main__:main'
+ ]
+ },
)

Add a __main__ and an entrypoint