Last active
August 29, 2015 14:13
-
-
Save nathanchere/327015644aad4847b264 to your computer and use it in GitHub Desktop.
Pygame development environment setup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################### | |
# Pygame development environment setup | |
####################################### | |
# | |
# Intended for use on a clean Xubuntu 14.10 install | |
# Will probably work in other environments but YMMV | |
# | |
####################################### | |
# Install Mercurial | |
sudo apt-get -y install mercurial | |
# Get Pygame source | |
cd ~ | |
hg clone https://bitbucket.org/pygame/pygame | |
# Install Pygame build dependencies | |
sudo apt-get -y install python3-dev | |
sudo apt-get -y install python3-numpy | |
sudo apt-get -y install libsdl-dev | |
sudo apt-get -y install libsdl-image1.2-dev | |
sudo apt-get -y install libsdl-mixer1.2-dev | |
sudo apt-get -y install libsdl-ttf2.0-dev | |
sudo apt-get -y install libsmpeg-dev | |
sudo apt-get -y install libportmidi-dev | |
sudo apt-get -y install libavformat-dev | |
sudo apt-get -y install libswscale-dev | |
sudo apt-get -y install libjpeg-dev | |
sudo apt-get -y install libfreetype6-dev | |
# Install additional tool for decoding the embedded hello world sample | |
sudo apt-get -y install sharutils | |
# Build Pygame | |
cd pygame | |
python3 setup.py build | |
# Install Pygame | |
sudo python3 setup.py install | |
# Install IDLE IDE | |
sudo apt-get -y install idle3 | |
# Decode the hello world sample | |
cat > helloworld.py <<'_EOF' | |
begin-base64 664 helloworld.py | |
aW1wb3J0IHB5Z2FtZSwgc3lzCmZyb20gcHlnYW1lLmxvY2FscyBpbXBvcnQg | |
KgoKcHlnYW1lLmluaXQoKQpESVNQTEFZID0gcHlnYW1lLmRpc3BsYXkuc2V0 | |
X21vZGUoKDMyMCwyNDApKQpweWdhbWUuZGlzcGxheS5zZXRfY2FwdGlvbign | |
SGVsbG8sIHdvcmxkIScpCgp3aGlsZSBUcnVlOgogICAgZm9yIGV2ZW50IGlu | |
IHB5Z2FtZS5ldmVudC5nZXQoKToKICAgICAgICBpZiBldmVudC50eXBlID09 | |
IFFVSVQ6CiAgICAgICAgICAgIHB5Z2FtZS5xdWl0KCkKICAgICAgICAgICAg | |
c3lzLmV4aXQoKQogICAgcHlnYW1lLmRpc3BsYXkudXBkYXRlKCkK | |
==== | |
_EOF | |
uudecode helloworld.py | |
# Run the sample | |
python3 helloworld.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment