diff --git a/pythonforandroid/bootstraps/pygame/build/build.properties b/pythonforandroid/bootstraps/pygame/build/build.properties
new file mode 100644
index 0000000000..f12e258691
--- /dev/null
+++ b/pythonforandroid/bootstraps/pygame/build/build.properties
@@ -0,0 +1,21 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
+key.store=${env.P4A_RELEASE_KEYSTORE}
+key.alias=${env.P4A_RELEASE_KEYALIAS}
+key.store.password=${env.P4A_RELEASE_KEYSTORE_PASSWD}
+key.alias.password=${env.P4A_RELEASE_KEYALIAS_PASSWD}
diff --git a/pythonforandroid/bootstraps/pygame/build/build.py b/pythonforandroid/bootstraps/pygame/build/build.py
index e453a54086..3a3fabb3cb 100755
--- a/pythonforandroid/bootstraps/pygame/build/build.py
+++ b/pythonforandroid/bootstraps/pygame/build/build.py
@@ -510,5 +510,8 @@ def parse_args(args=None):
make_package(args)
+ return args
+
+
if __name__ == '__main__':
parse_args()
diff --git a/pythonforandroid/bootstraps/pygame/build/templates/build.xml b/pythonforandroid/bootstraps/pygame/build/templates/build.xml
index 8dd0bc3f10..8f6b846491 100644
--- a/pythonforandroid/bootstraps/pygame/build/templates/build.xml
+++ b/pythonforandroid/bootstraps/pygame/build/templates/build.xml
@@ -5,6 +5,9 @@
+
+
+
+
+