-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: compatibility with cx_Freeze #478
Comments
Do you have an example of what your result might look like? I don't know much about cx_freeze. I vaguely intended to implement a bdist_apk in what's presumably the same kind of way though. |
The setup script for cx_Freeze is similar to this: import sys
import os
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages":["keyring"]}
setup(name = "Name",
version = "0.1",
description = "Description",
packages = ["package"],
options = {"build_exe": build_exe_options},
executables = [Executable("package/main.py")]) To build for windows, I run My implementation would be something like this: try:
from cx_Freeze import Executable
class BdistAPK(Command):
description = 'Create an APK with python-for-android'
user_options = []
def initialize_options(sel):
# Initialize options
def finalize_options(self):
# Finalize options
def run(self):
initScript = self.distribution.executables.initScript
# Call the ToolchainCL with info.
except ImportError:
# Use the current (non-working) implementation. Basically, if the user has cx_Freeze installed, the user will be able to use |
How would you set all the different options? As arguments to the Executable-like class, or to setup, or some other way? |
Well, let's look at the different options:
Basically I would reuse the format so that the same setup script could build both the msi and the apk. |
This seems largely ideal for what I thought bdist_apk should probably be (though all those settings should be manually configurable as well), so this sounds good to me. It would be great if you were to implement a full cx_freeze-like api that doesn't depend on anything else. If this would be significantly harder than depending on cx_freeze, then I'd be happy to merge a cx_freeze-depending version first and leave the rest for later. |
I'll close this now since it's not really an open issue. |
Currently, I have an application that should run on android and windows. I am building my windows version with cx_Freeze because:
The buildozer personally bothers me because it uses its own system rather than the standard distutils.
cx_Freeze adds an Executable class to determine which scripts are the main entry points. What I am wondering is this: if I were to implement the bdist_apk command with the cx_Freeze Executable class (if cx_Freeze is installed) so that I would be able to use one setup.py file to build everything and submit a pull request, would this be accepted? It would only be active if cx_Freeze is detected, and would make things so much simpler on my part.
The text was updated successfully, but these errors were encountered: