...

/

Choose a Project to Package

Choose a Project to Package

Learn how to package your first real project with an APKBUILD.

Preface

For this lesson, we’ll package guesser-game, a simple game written in Python. In this game, the program will try to guess what number you picked. A simple run of the game might look like this:

Press + to interact
>>> from guesser_game import GuessMyNumber
>>> GuessMyNumber().play()
Follow these steps and I will guess your result
Press Enter to continue...
Lets play!
Think a number greater than 0, do not tell me
Press Enter to continue...
Multiple your number times 2
Press Enter to continue...
Add 8
Press Enter to continue...
Divide your result by 2
Press Enter to continue...
Last step, subtract to your result the number you initially though
Press Enter to continue...
...
Guessing your result...
...
Your result is 4
>>>

In this case, we actually picked 12 as our number, so the game guessed correctly that our end result is 4!

Make sure the package doesn’t exist yet

The first step of packaging anything is to ensure that the package doesn’t exist yet. It would be unfortunate if we go through the trouble of making an APKBUILD ...