Skip to content

Commit

Permalink
added main file
Browse files Browse the repository at this point in the history
  • Loading branch information
kathyle9 committed Aug 27, 2019
1 parent 5f4b115 commit 84e7396
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
1 change: 0 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# file GENERATED by distutils, do NOT edit
README.txt
setup.cfg
setup.py
pyrosetta-colab/colab.py
Binary file added dist/pyrosetta-colab-0.2.tar.gz
Binary file not shown.
Binary file added pyrosetta-colab/.colab.py.swp
Binary file not shown.
30 changes: 30 additions & 0 deletions pyrosetta-colab/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import sys

def main():
is_colab = 'google.colab' in sys.modules
if is_colab:
# Mounting Google Drive and add it to Python sys path

google_drive_mount_point = '/content/google_drive'

import os, sys, time
from google.colab import drive
drive.mount(google_drive_mount_point)

google_drive = google_drive_mount_point + '/My Drive'
google_drive_prefix = google_drive + '/prefix'

if not os.path.isdir(google_drive_prefix): os.mkdir(google_drive_prefix)

pyrosetta_install_prefix_path = '/content/prefix'
if os.path.islink(pyrosetta_install_prefix_path): os.unlink(pyrosetta_install_prefix_path)
os.symlink(google_drive_prefix, pyrosetta_install_prefix_path)


for e in os.listdir(pyrosetta_install_prefix_path): sys.path.append(pyrosetta_install_prefix_path + '/' + e)

else: print("Not in Colab")

if __name__ == "__main__":
main()
~
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
setup(
name = 'pyrosetta-colab', # How you named your package folder (MyLib)
packages = ['pyrosetta-colab'], # Chose the same as "name"
version = '0.1', # Start with a small number and increase it with every change you make
version = '0.2', # Start with a small number and increase it with every change you make
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
description = 'Contains commands for using PyRosetta in Google Colaboratory', # Give a short description about your library
author = 'Kathy Le', # Type in your name
author_email = 'kle16@jhu.edu', # Type in your E-Mail
url = 'https://github.com/kathyle9/pyrosetta-colab', # Provide either the link to your github or to your website
download_url = 'https://github.com/kathyle9/pyrosetta-colab/archive/v_01.tar.gz', # I explain this later on
download_url = 'https://github.com/kathyle9/pyrosetta-colab/archive/v_02.tar.gz', # I explain this later on
keywords = ['PyRosetta', 'Google Colaboratory'], # Keywords that define your package best
install_requires=[ # I get to this in a second
],
Expand Down

0 comments on commit 84e7396

Please sign in to comment.