Skip to content

Conversation

@kuzeyron
Copy link
Contributor

@kuzeyron kuzeyron commented Nov 19, 2025

First attempt on splitting the default spec so the user will only be greeted with the minimal spec file if just running buildozer init.

Usage:
- buildozer init
- buildozer init android
- buildozer init android --no-comments
- buildozer init ios
- buildozer init ios --no-docs
- buildozer init osx

Each options includes the documentation and default text to the buildozer.spec file and also aware not to include duplicates just to make it easier for the user.

These steps involves making it easier in the future for the developers to change default values without messing up the documentations.

With this PR I have also updated the default values to match our daily usage with Buildozer.

@kuzeyron
Copy link
Contributor Author

Android integration seems to be failing because Buildozer doesn't automatically accept the licenses.
iOS part is complaining about it cannot deploy the application.

@T-Dynamos
Copy link
Member

setup.py doesn't add *.json files by default. Maybe change to

--- a/setup.py                                                                  
+++ b/setup.py                                                                  
@@ -68,7 +68,7 @@ setup(                                                        
     packages=[                                                                 
         'buildozer', 'buildozer.targets', 'buildozer.libs', 'buildozer.scripts'
     ],                                                                         
-    package_data={'buildozer': ['default.spec']},                              
+    package_data={'buildozer': ['default*.*']},                                
     include_package_data=True,                                                 
     install_requires=[                                                         
         'pexpect',                                                             

@T-Dynamos
Copy link
Member

Android CI fails because of the leading space in the commented SDK-license line. Removing that space (as in this patch) fixes the sed match.

diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml                                    
index 65c8f63..c1d9a9f 100644                                                                                 
--- a/.github/workflows/android.yml                                                                           
+++ b/.github/workflows/android.yml                                                                           
@@ -30,7 +30,7 @@ jobs:                                                                                       
     - run: buildozer init                                                                                    
     - name: SDK, NDK, and p4a download                                                                       
       run: |                                                                                                 
-        sed -i.bak "s/# android.accept_sdk_license = False/android.accept_sdk_license = True/" buildozer.spec
+        sed -i.bak "s/#android.accept_sdk_license = False/android.accept_sdk_license = True/" buildozer.spec 
         sed -i.bak "s/#p4a.branch = master/p4a.branch = develop/" buildozer.spec                             
         buildozer android p4a -- --help                                                                      
     # Install OS specific dependencies                                                                       

@kuzeyron
Copy link
Contributor Author

Good catch @T-Dynamos ! Now it's just iOS that is failing..

@T-Dynamos
Copy link
Member

It might be useful to add a --no-docs or --no-comments option, so the generated spec file can omit documentation comments. This would help keep the output minimal and cleaner for users who prefer a more compact file.

@kuzeyron
Copy link
Contributor Author

Added that + possible cure for the deploy part for the ios part.

@kuzeyron
Copy link
Contributor Author

PR is ready for review.

Copy link
Member

@T-Dynamos T-Dynamos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants