Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Set path variables
  4.  
  5. DIR=`pwd`
  6. SYS_PACKAGES=/usr/local/lib/python2.7/dist-packages
  7. VENV_PACKAGES=$DIR/Venv-Linux/lib/python2.7/site-packages
  8.  
  9. # Install all kivy dependencies via Apt.
  10.  
  11. sudo apt-get install -y python2.7 python-setuptools python-pip python-pygame python-opengl \
  12. python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev build-essential \
  13. libgl1-mesa-dev libgles2-mesa-dev zlib1g-dev
  14.  
  15. # Install kivy dependencies via Pip.
  16.  
  17. sudo pip install cython
  18. sudo pip install numpy
  19. sudo pip install pyenchant
  20. sudo pip install Pygments
  21. sudo pip install buildozer
  22. sudo pip install plyer
  23.  
  24. # Add Kivy's PPA for stable builds and then install kivy.
  25.  
  26. if [ -f /etc/apt/sources.list.d/kivy-team-kivy-trusty.list ]; then
  27. echo "Kivy PPA already added. Testing of Kivy is installed."
  28. sudo apt-get install python-kivy
  29. else
  30. sudo add-apt-repository ppa:kivy-team/kivy
  31. sudo apt-get install python-kivy
  32. fi
  33.  
  34. # Lastly install virtualenv via pip.
  35.  
  36. sudo pip install virtualenv
  37.  
  38. # Check if directory "Venv-Linux" exists. If it doesn't, a new virtual
  39. # environment is created in that directory. -Linux is attached to the end
  40. # for projects worked on from multiple environments.
  41.  
  42. if [ -f Venv-Linux/bin/python ]; then
  43. echo "Virtual Environment already installed!"
  44. else
  45. virtualenv Venv-Linux
  46. fi
  47.  
  48. # For kivy to work inside the virtual environment, some system packages have to be linked.
  49.  
  50. ln -s $SYS_PACKAGES/buildozer $VENV_PACKAGES
  51. ln -s $SYS_PACKAGES/Cython $VENV_PACKAGES
  52. ln -s $SYS_PACKAGES/garden $VENV_PACKAGES
  53. ln -s $SYS_PACKAGES/kivy $VENV_PACKAGES
  54. ln -s $SYS_PACKAGES/plyer $VENV_PACKAGES
  55. ln -s $SYS_PACKAGES/pyenchant-1.6.5-py2.7.egg $VENV_PACKAGES
  56. ln -s $SYS_PACKAGES/pygame $VENV_PACKAGES
  57.  
  58. # # The next few lines makes the script useful cross-project for multiple users.
  59. # # If your project is using specific packages that aren't linked above, provide a
  60. # # requirements.txt file in the root project directory and pipe your dependencies
  61. # # into that file.
  62.  
  63. # # Switch to virtual environment shell.
  64.  
  65. # source Venv-Linux/bin/activate
  66.  
  67. # # Installs any environment specific packages you may need.
  68.  
  69. # sudo pip install -Ur $DIR/requirements.txt
  70.  
  71. # deactivate
  72. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement