Skip to content
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

script.py without "(" print command #3068

Open
bpescarolli opened this issue Oct 7, 2024 · 0 comments
Open

script.py without "(" print command #3068

bpescarolli opened this issue Oct 7, 2024 · 0 comments

Comments

@bpescarolli
Copy link

The file script.py is generate without "(" print command , i use pyhton3 ....

`"""
Copyright (c) 2011 Michael Elsdoerfer [email protected]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

import sys
from os import path
import logging

from build import AndroidProject, ProgramFailedError, LOGGER_NAME

def main(argv):
scriptname = path.basename(sys.argv[0])
if len(argv) != 1:
print "Builds the Android project in the current directory."
print "Usage: %s PATH_TO_SDK" % scriptname
return 1

 # Setup logging
 log = logging.getLogger(LOGGER_NAME)
 sh = logging.StreamHandler()
 sh.setFormatter(logging.Formatter("> %(message)s"))
 log.addHandler(sh)

 p = AndroidProject('AndroidManifest.xml', sdk_dir=argv[0])
 try:
      apk = p.build()

      keystore = path.expanduser('~/.android/debug.keystore')
      if path.exists(keystore):
           print "Signing with debug key..."
           apk.sign(keystore, 'androiddebugkey', 'android')
           apk.align()
      else:
           print "Note: Package will be unsigned!"

      print "Created: %s" % apk.filename
 except ProgramFailedError, e:
      print u"ERROR: %s" % unicode(e)
      print
      if e.stdout:
           print "STDOUT"
           print "------"
           print e.stdout
      if e.stderr:
           print "STDERR"
           print "------"
           print e.stderr

def run():
sys.exit(main(sys.argv[1:]) or 0)

if name == 'main':
run()`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant