예제 #1
0
def setup_func():
    global test_data_dir

    config = TConfig()
    updater = PyiUpdater(config)
    ph = PackageHandler(updater)
    kh = KeyHandler(updater)
    kh.test = True
    ph.setup()
    kh.make_keys()
def make_keys():
    pyi = PyiUpdater(DefaultConfig())
    key_handler = KeyHandler(pyi)
    # Making a new set of keys
    # Keys will be place in the keys
    # Directory, in the pyi-data folder
    # *** Should not be ran again after
    # you deploy your app!!!! ***
    # If you need to make new keys pass
    # overwrite=True to make_keys
    key_handler.make_keys()
예제 #3
0
def make_keys():
    pyi = PyiUpdater(DefaultConfig())
    key_handler = KeyHandler(pyi)
    # Making a new set of keys
    # Keys will be place in the keys
    # Directory, in the pyi-data folder
    # *** Should not be ran again after
    # you deploy your app!!!! ***
    # If you need to make new keys pass
    # overwrite=True to make_keys
    key_handler.make_keys()
예제 #4
0
def test_execution():
    global test_data_dir

    config = TConfig()
    updater = PyiUpdater(config)
    ph = PackageHandler(updater)
    kh = KeyHandler(updater)

    ph.setup()
    kh.test = True
    kh.make_keys()

    # Make zipfile
    with ChDir(test_data_dir):
        os.mkdir(u'test-app')
        with ChDir(u'test-app'):
            with open(u'app.txt', u'w') as f:
                f.write(u'I am so happy' * 1000)
        shutil.make_archive(u'Test App-mac-0.2.0', u'zip', u'test-app')
        shutil.move(u'Test App-mac-0.2.0.zip', u'new')
    ph.process_packages()
    kh.sign_update()