digital-sapphire / pyupdater Goto Github PK
View Code? Open in Web Editor NEWPyinstaller auto-update library
Home Page: https://www.pyupdater.org
Pyinstaller auto-update library
Home Page: https://www.pyupdater.org
Hi,
This morning, I upgraded to python 3.6 (I'm on Archlinux). Even if I always use virtualenvs when I'm coding, I get the following error just by running 'pyupdater' in the virtualenv. Python 3.5.1 is supposed to be used and yesterday, it worked fine.
pyupdater
Traceback (most recent call last):
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/dsdev_utils/helpers.py", line 115, in __getattribute__
return object.__getattribute__(self, attr)
AttributeError: '_LazyImport' object has no attribute 'core'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/djipey/.local/share/virtualenvs/cb/bin/pyupdater", line 7, in <module>
from pyupdater.cli import main
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/pyupdater/__init__.py", line 69, in <module>
PyUpdater = pyupdater.core.PyUpdater
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/dsdev_utils/helpers.py", line 118, in __getattribute__
self._dsdev_lazy_load()
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/dsdev_utils/helpers.py", line 104, in _dsdev_lazy_load
self._dsdev_lazy_target = self._dsdev_lazy_loader()
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/pyupdater/__init__.py", line 32, in pyupdater
import pyupdater.core
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/pyupdater/core.py", line 30, in <module>
from pyupdater.key_handler.keys import KeyImporter
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/pyupdater/key_handler/keys.py", line 33, in <module>
import ed25519
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/ed25519/__init__.py", line 1, in <module>
from .keys import (BadSignatureError, BadPrefixError,
File "/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/ed25519/keys.py", line 3, in <module>
from . import _ed25519
ImportError: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
This exception is cryptic and I don't really know where to start. Could you give me a hand please ?
app_update.extract_restart()
File "pyupdater/client/updates.py", line 515, in extract_restart
File "pyupdater/client/updates.py", line 609, in _restart
File "pyupdater/client/updates.py", line 134, in __init__
File "posixpath.py", line 70, in join
AttributeError: 'NoneType' object has no attribute 'endswith'
Hi. Looking to use your library in a project. pip installed cleanly. Running on windows 7 / python 2.7 32 bit.
Within pyupdater/init.py, line 77 looks for a jms_utils.logger.log_format_string(). The setup installed jms-utils-1.0.2, which does not have a method log_format_string() inside of jms_utils.logger.
Any chance the version number dependency is wrong in the requirements file? How can I help?
Tox will run update_repo_extract and update_repo_restart in parallel, but they will write to the same update_folder. When build the master code on travis-ci.org, it fails randomly.
After I changed "-n auto" to "-n 1", the tests never fail. This might get fixed by changing the APP_NAME to different ones or with commits from this branch.
The current implementation will download the whole file into memory and will crash when the file is too large.
[INFO] root 102: PyUpdater 2.3.1
[ERROR] root 112: 'module' object is not callable
[DEBUG] root 113: 'module' object is not callable
Traceback (most recent call last):
File "/Users/jmswag/.pyenv/versions/3.5.1/envs/batch-engine/lib/python3.5/site-packages/pyupdater/cli/init.py", line 104, in main
_real_main(args)
File "/Users/jmswag/.pyenv/versions/3.5.1/envs/batch-engine/lib/python3.5/site-packages/pyupdater/cli/init.py", line 85, in _real_main
_dispatch_command(args, pyi_args)
File "/Users/jmswag/.pyenv/versions/3.5.1/envs/batch-engine/lib/python3.5/site-packages/pyupdater/cli/init.py", line 94, in _dispatch_command
getattr(commands, cmd)(args, pyi_args)
TypeError: 'module' object is not callable
Hi, I wonder if it is possible to make the latest
attribute from the class Client
public.
I would change https://github.com/JMSwag/PyUpdater/blob/master/pyupdater/client/__init__.py#L244 to something like that:
self.latest = get_highest_version(name, self.platform, channel, self.easy_data)
With the idea to later do:
self.app = client.update_check(client.app_name, version)
log("Updating to version {}".format(client.latest))
Basically, I would simply like to log the version that my program is installing, so I can debug more effectively if one of my users encounters a problem.
But maybe I am missing an attribute in your API. If not, I could easily make a PR, if you agree.
Hi! I'm trying to use pyupdater in a kivy-application, I have a requirement to be able to publish the app in both Android iOS OSX and windows :'(
When I build with pyupdater on my mac I get a binary file and no .app (building with pyinstaller works fine), do pyupdater support OSX? I cant find anything in the docs about this.
spec file:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['/kivy/main.py'],
pathex=['/kivy', '/kivy'],
binaries=None,
datas=[
('***.kv', '.'),
('***.icns', '.'),
('***.png', '.'),
('***.png', '.'),
],
hiddenimports=[],
hookspath=['/kivy/env/lib/python3.5/site-packages/pyupdater/hooks'],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='mac',
debug=False,
strip=False,
upx=True,
console=False )
coll = COLLECT(exe, Tree('files/'),
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='main')
app = BUNDLE(coll,
name='***.app',
icon='***.icns',
bundle_identifier=None)
Using the latest PyUpdater (2.3.2) + PyInstaller (3.2.1)
I am unable to use the following in my spec file,
uac_admin=True,
uac_uiaccess=True,
version_file='version.txt'
they have no effect on the output
"Example of using the client within your app can be found in the demos folder."
There is no demos folder.
In case of corruption I'd like to backup the corrupt database then create a new one. This option will be applied with a --force flag. If no --force flag is given then show an error and quit.
An error occurred when running pyupdater plugins
after pip install pyupdater[s3, scp]
D:\sources\python\gc>pyupdater plugins
usage: pyupdater
pyupdater: error: argument command: invalid choice: 'plugins' (choose from 'archive', 'bui
ld', 'clean', 'collect-debug-info', 'init', 'keys', 'make-spec', 'pkg', 'settings', 'uploa
d', 'version')
pyupdater collect-debug-info
[INFO] Starting log export
[INFO] Collecting logs
[INFO] Found all logs
[ERROR] __init__() got an unexpected keyword argument 'data'
pyupdater version 2.1.4+14.geb460aa
I am using PyUpdater
to build my app, but an error occurred when running my app.
here is build log:
pyupdater build -F --app-version 1.0 main.py
[INFO] wrote D:\sources\python\gc\.pyupdater\spec\win.spec
[INFO] PyInstaller: 3.1.1
[INFO] Python: 3.4.3
[INFO] Platform: Windows-8-6.2.9200
[INFO] UPX is not available.
[INFO] Extending PYTHONPATH with paths
['D:\\sources\\python', 'D:\\sources\\python\\gc\\.pyupdater\\spec']
[INFO] checking Analysis
[INFO] Building Analysis because out00-Analysis.toc is non existent
[INFO] Initializing module dependency graph...
[INFO] Initializing module graph hooks...
[INFO] Analyzing base_library.zip ...
[INFO] Processing pre-find module path hook distutils
[INFO] running Analysis out00-Analysis.toc
[INFO] Analyzing D:\sources\python\gc\main.py
[INFO] Processing pre-safe import module hook six.moves
[INFO] Processing pre-safe import module hook win32com
[INFO] Processing pre-find module path hook site
[INFO] site: retargeting to fake-dir 'd:\\python34\\lib\\site-packages\\PyInstaller\\fake-modules'
[INFO] Looking for import hooks ...
[INFO] Processing hook hook-pkg_resources.py
[INFO] Processing hook hook-sysconfig.py
[INFO] Processing hook hook-cryptography.py
[INFO] Processing hook hook-pydoc.py
[INFO] Processing hook hook-PyQt5.py
[INFO] Processing hook hook-distutils.py
[INFO] Processing hook hook-pythoncom.py
[INFO] Processing hook hook-xml.dom.domreg.py
[INFO] Processing hook hook-win32com.py
[INFO] Processing hook hook-certifi.py
[INFO] Processing hook hook-encodings.py
[INFO] Processing hook hook-jms_utils.py
[INFO] Processing hook hook-xml.py
[INFO] Processing hook hook-PyQt5.QtCore.py
[INFO] Processing hook hook-PyQt5.QtWidgets.py
[INFO] Processing hook hook-PyQt5.Qt.py
[INFO] Processing hook hook-pywintypes.py
[INFO] Processing hook hook-PyQt5.QtGui.py
[INFO] Processing hook hook-requests.py
[INFO] Looking for ctypes DLLs
[INFO] Analyzing run-time hooks ...
[INFO] Including run-time hook 'pyi_rth_win32comgenpy.py'
[INFO] Including run-time hook 'pyi_rth_pkgres.py'
[INFO] Including run-time hook 'pyi_rth_qt5.py'
[INFO] Including run-time hook 'pyi_rth_qt5plugins.py'
[INFO] Looking for dynamic libraries
[WARNING] Attempted to add Python module twice with different upper/lowercases: PyQt5.Qt
[WARNING] Attempted to add Python module twice with different upper/lowercases: PyQt5.QtPrintSupport
[WARNING] Attempted to add Python module twice with different upper/lowercases: PyQt5.QtGui
[WARNING] Attempted to add Python module twice with different upper/lowercases: PyQt5.QtWidgets
[WARNING] Attempted to add Python module twice with different upper/lowercases: PyQt5.QtCore
[INFO] Looking for eggs
[INFO] Using Python library C:\WINDOWS\system32\python34.dll
[INFO] Found binding redirects:
[]
[INFO] Warnings written to D:\sources\python\gc\.pyupdater\work\win\warnwin.txt
[INFO] checking PYZ
[INFO] Building PYZ because out00-PYZ.toc is non existent
[INFO] Building PYZ (ZlibArchive) D:\sources\python\gc\.pyupdater\work\win\out00-PYZ.pyz
[INFO] checking PKG
[INFO] Building PKG because out00-PKG.toc is non existent
[INFO] Building PKG (CArchive) out00-PKG.pkg
[INFO] Bootloader d:\python34\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
[INFO] checking EXE
[INFO] Building EXE because out00-EXE.toc is non existent
[INFO] Building EXE from out00-EXE.toc
[INFO] Appending archive to EXE D:\sources\python\gc\pyu-data\new\win.exe
[INFO] gc-win-1.0.zip has been placed in your new folder
[INFO] Build finished in 184.52 seconds.
and error log:
gc.exe
Traceback (most recent call last):
File "<string>", line 10, in <module>
ImportError: No module named 'org'
main returned -1
org
is my custom module
thanks for you help
I'd like to add an option to allow update_check to be less restrictive about only checking for updates on a specific channel. Basically allow the old behavior, removed here , but default to the current restrictive check.
System info: Windows 10 64 bit
Installed PyUpdater with: pip install PyUpdater[all]
Tried to generate keys: pyupdater keys -c
Got this output in cmd:
Are you sure you want to continue?
[N/y]?y
Please enter app name - No Default Available
--> drm
You entered drm, is this correct?
[N/y]?y
[ERROR]
Relevant logged info:
[DEBUG] dsdev_utils.terminal 225: Under None
[DEBUG] dsdev_utils.terminal 232: Must be true
[DEBUG] pyupdater.utils 288: PyUpdater config data folder is missing
[DEBUG] pyupdater.utils 288: PyUpdater config data folder is missing
[DEBUG] dsdev_utils.terminal 225: Under None
[DEBUG] dsdev_utils.terminal 232: Must be true
[DEBUG] pyupdater.key_handler.keys 105: off_pri type: UGLplEMlkPgwJJqa2cghSVZoA+OKkV83iY5JZaCIyw8
[DEBUG] root 420:
Traceback (most recent call last):
File "c:\program files\anaconda3\lib\site-packages\pyupdater\cli_init_.py", line 414, in main
real_main(args)
File "c:\program files\anaconda3\lib\site-packages\pyupdater\cli_init.py", line 392, in real_main
keys(args)
File "c:\program files\anaconda3\lib\site-packages\pyupdater\cli_init.py", line 181, in keys
keys(args)
File "c:\program files\anaconda3\lib\site-packages\pyupdater\cli_init.py", line 204, in _keys
k.make_keypack(app_name)
File "c:\program files\anaconda3\lib\site-packages\pyupdater\key_handler\keys.py", line 69, in make_keypack
keypack = self._gen_keypack(name)
File "c:\program files\anaconda3\lib\site-packages\pyupdater\key_handler\keys.py", line 111, in _gen_keypack
signing_key = ed25519.SigningKey(off_pri, encoding='base64')
File "c:\program files\anaconda3\lib\site-packages\ed25519\keys.py", line 85, in init
vk_s, sk_s = _ed25519.publickey(sk_s)
MemoryError
Hi @JMSwag !
I just came across your project and wanted to find out more about it, but noticed your website is down: http://www.pyupdater.org/
Any info on that?
Regards, Jonathan.
I am using pyupdater build --app-version=1.0.0
to build my app, and package it with 'pyupdater pkg -- process' and 'pyupdater pkg --sign'.
In pyu-data/deploy/versions.gz
:
'''
{"latest": {"gc": {"stable": {"win": "1.0.0.2.0"}}}, "updates": {"gc": {"1.0.0.2.0": {"win": {"file_size": 5083822, "file_hash": "b7efb833be6288ad26dde3f66c69f13ce8d30faf70574ec1818078981d37019c", "filename": "gc-win-1.0.0.zip"}}}}, "signature": "f0bcbRdtIzVJJ9CkIYM988dVJbBMq5ei2DWSC6RyRiAI+Xje30w6xhfrJH6ZH3e3eWxGn7bqfbeOgdv7KM17Cw"}
'''
Wonder why my version is 1.0.0.2.0????
Add the ability to include changelog notes to releases which can be accessed via Client
I am using the following Version scheme: 0.0.1701a-## where -## is my pre-release commit identifer, it worked great until I built 0.0.1701b.##. For example it still is reporting 0.0.1710b-45 (0.0.1710-1-45) as being higher than 0.0.1710a-55 (0.0.1710.0.55). I understand from the code why it is working that way, but the releaseversion is really worthless since it appears that the release/channel will always be higher for a given patch. For all intents the alpha channel is dead at this point. My stable release will be 1.0.1710 as an example where the pre-release identifiers are no longer needed.
My thinking is that for a given channel, they should only pickup a "higher" version from a higher alternate channel. For example let's reverse my numbers. Some work was merged into the beta channel and now sits at 55 while alpha builds have not progressed past 52. I would not mind someone subscribed to alpha receiving 55.
I can make it work according to my expectations by removing the release from the tuple used to compare 2 Version Objects. Another option is changing the order, and placing the releaseversion higher in the hierarchy so that the "channel" is the lowest level but I expect that would cause other issues.
Looking for your insight on the proper direction.
I got this error after the update is downloaded and this function is the culprit
app_update.extract_restart()
any idea why?
File "pyupdater/client/updates.py", line 609, in _restart
File "pyupdater/client/updates.py", line 134, in __init__
File "posixpath.py", line 70, in join
AttributeError: 'NoneType' object has no attribute 'endswith'
Failed to execute script app
To add support for pyinstaller onedir, the following functions & methods need to be updated.
See #12
0.0.1701-19.
It is reported as an error but I can not determine why. It follows the documented standard of Major, Minor, Patch, releaseversion.
Hi,
After a few tests, I would like to use pyupdater for "real" projects.
I'm developing a GUI software, and I would like to bundle data files (icons, text files, etc).
Here is my nix64.spec:
# -*- mode: python -*-
block_cipher = None
added_files = [('images/*', 'images'),
('journals/*', 'journals'),
('config/data.bin', 'config'),
('config/regex.txt', 'config'),
('config/stop_words.txt', 'config'),
('config/tuto.txt', 'config'),
('config/version.txt', 'config'),
('config/whatsnew.txt', 'config'),
('config/fields/*', 'config/fields')
]
imports = ['packaging', 'packaging.version', 'packaging.specifiers', 'packaging.requirements']
excludes = ['pyi_rth_pkgres', 'pyi_rth_qt4plugins', 'pkg_resources', 'lib2to3',
'runpy', 'xmlrpc', 'doctest', 'tty', 'getopt']
a = Analysis(['/home/djipey/informatique/python/ChemBrows/gui.py'],
pathex=['/home/djipey/informatique/python/ChemBrows', '/home/djipey/informatique/python/ChemBrows'],
binaries=None,
datas=added_files,
hiddenimports=imports,
hookspath=['/home/djipey/.local/share/virtualenvs/cb/lib/python3.5/site-packages/pyupdater/hooks'],
runtime_hooks=[],
excludes=excludes,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
rm_bins = ['libQtWebKit', 'libQtGui', 'libQtXmlPatterns', 'libmysqlclient',
'libQt3Support', 'libwebp', 'libXss', 'libXft', 'libcrypto', 'libtcl',
'libtk', 'libX11', 'libgstreamer', 'libgcrypt', 'libQtOpenGL.so',
'libfbclient', 'libfreetype', 'libgcc_s', 'libsqlite3',
'libQtDBus', 'libsystemd', 'libgstvideo', 'liborc', 'libharfbuzz', 'libpcre',
'libmng', 'bncursesw', 'libgstbase', 'libgstaudio', 'liblcms2', 'libQtSvg',
'liblapack', 'libatlas', 'libgobject', 'libopenjp2', 'libquadmath',
'libgsttag', 'libmpdec', 'libgstpbutils', 'libxcb-glx', 'libICE', 'libQtXml',
'libfontconfig', 'libglapi', 'libgraphite2', 'libexpat', 'libXext', 'liblz4']
full_tuples = []
for each_bin in a.binaries:
for each_rm_bin in rm_bins:
if each_rm_bin in each_bin[0]:
full_tuples.append((each_bin[0], None, None))
a.binaries = a.binaries - TOC(full_tuples)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='nix64',
debug=False,
strip=False,
upx=True,
console=True )
Pyupdater builds the package with no error. However, it seems the data are not bundled in the package, because when I try to run the program, I get the following error:
Traceback (most recent call last):
File "gui.py", line 2711, in <module>
File "gui.py", line 130, in __init__
File "gui.py", line 256, in logConnection
FileNotFoundError: [Errno 2] Aucun fichier ou dossier de ce type: '/home/djipey/informatique/python/ChemBrows/pyu-data/new/config/version.txt'
Failed to execute script gui
(It means the program did not find the file config/version.txt).
If it is possible to bundle files with pyupdater, how should I do it ?
2016-11-04 22:52:00,302 root INFO Version: 0.1.0
2016-11-04 22:52:00,303 pyupdater.client DEBUG Setting up directories...
2016-11-04 22:52:00,303 pyupdater.client DEBUG Downloading key file
2016-11-04 22:52:00,303 pyupdater.client.downloader DEBUG Url for request: http://localhost:8000/keys.gz
2016-11-04 22:52:00,303 urllib3.connectionpool DEBUG Starting new HTTP connection (1): localhost
2016-11-04 22:52:00,308 urllib3.connectionpool DEBUG http://localhost:8000 "GET /keys.gz HTTP/1.1" 200 179
2016-11-04 22:52:00,308 pyupdater.client.downloader DEBUG Resource URL: http://localhost:8000/keys.gz
2016-11-04 22:52:00,308 pyupdater.client.downloader DEBUG Got content length of: 179
2016-11-04 22:52:00,309 pyupdater.client.downloader DEBUG Block size: 356
2016-11-04 22:52:00,309 pyupdater.client.downloader DEBUG {u'status': u'downloading', u'downloaded': 179, u'total': 179, u'percent_complete': u'100.0', u'time': u'--:--'}
2016-11-04 22:52:00,309 pyupdater.client.downloader DEBUG {u'status': u'finished', u'downloaded': 179, u'total': 179, u'percent_complete': u'100.0', u'time': u'00:00'}
2016-11-04 22:52:00,309 pyupdater.client.downloader DEBUG Download Complete
2016-11-04 22:52:00,309 pyupdater.client.downloader DEBUG No hash to verify
2016-11-04 22:52:00,309 pyupdater.client DEBUG Key file download successful
2016-11-04 22:52:00,310 dsdev_utils.paths DEBUG Changing to Directory --> /Users/ben/Library/Application Support/test_app
2016-11-04 22:52:00,310 pyupdater.client DEBUG Writing version file to disk
2016-11-04 22:52:00,310 dsdev_utils.paths DEBUG Moving back to Directory --> /
2016-11-04 22:52:00,312 pyupdater.client DEBUG Key file verified
2016-11-04 22:52:00,312 pyupdater.client DEBUG Loading version file...
2016-11-04 22:52:00,313 pyupdater.client DEBUG Downloading online version file
2016-11-04 22:52:00,313 pyupdater.client.downloader DEBUG Url for request: http://localhost:8000/versions.gz
2016-11-04 22:52:00,313 urllib3.connectionpool DEBUG Starting new HTTP connection (1): localhost
2016-11-04 22:52:00,314 urllib3.connectionpool DEBUG http://localhost:8000 "GET /versions.gz HTTP/1.1" 200 917
2016-11-04 22:52:00,315 pyupdater.client.downloader DEBUG Resource URL: http://localhost:8000/versions.gz
2016-11-04 22:52:00,315 pyupdater.client.downloader DEBUG Got content length of: 917
2016-11-04 22:52:00,315 pyupdater.client.downloader DEBUG Block size: 1832
2016-11-04 22:52:00,315 pyupdater.client.downloader DEBUG {u'status': u'downloading', u'downloaded': 917, u'total': 917, u'percent_complete': u'100.0', u'time': u'--:--'}
2016-11-04 22:52:00,315 pyupdater.client.downloader DEBUG {u'status': u'finished', u'downloaded': 917, u'total': 917, u'percent_complete': u'100.0', u'time': u'00:00'}
2016-11-04 22:52:00,315 pyupdater.client.downloader DEBUG Download Complete
2016-11-04 22:52:00,316 pyupdater.client.downloader DEBUG No hash to verify
2016-11-04 22:52:00,316 pyupdater.client DEBUG Version file download successful
2016-11-04 22:52:00,316 dsdev_utils.paths DEBUG Changing to Directory --> /Users/ben/Library/Application Support/test_app
2016-11-04 22:52:00,316 pyupdater.client DEBUG Writing version file to disk
2016-11-04 22:52:00,316 dsdev_utils.paths DEBUG Moving back to Directory --> /
2016-11-04 22:52:00,317 pyupdater.client DEBUG Data type: <type 'str'>
2016-11-04 22:52:00,317 pyupdater.client DEBUG Deleting signature from update data
2016-11-04 22:52:00,319 pyupdater.client DEBUG Version file verified
2016-11-04 22:52:00,319 pyupdater.client DEBUG Version Data:
{u'latest': {u'test_app': {u'stable': {u'mac': u'0.2.0.2.0'}}}, u'updates': {u'test_app': {u'0.3.0.2.0': {u'mac': {u'filename': u'test_app-mac-0.3.0.tar.gz', u'file_hash': u'cb8468b5749c708d98a62813c973959c8fa17544727eaebd7d4893be6dcb3f92', u'patch_name': u'test_app-mac-24', u'file_size': 6872134, u'patch_hash': u'42c5ee262b5357906a0db1eadc54a45e2ce43b235ee38166e7f3dc34017a0732', u'patch_size': 2200}}, u'1.0.0.2.0': {u'mac': {u'filename': u'test_app-mac-1.0.0.tar.gz', u'file_hash': u'fcb56551f7297116a01ca5ba2d69d744861c1c364b6eb453e7ae18def0720fd9', u'patch_name': u'test_app-mac-15', u'file_size': 6984789, u'patch_hash': u'96b577d575bf2bb5a9b513c917399c319f660fe760cf03dc4323531cfd87a090', u'patch_size': 223}}, u'1.0.1.2.0': {u'mac': {u'filename': u'test_app-mac-1.0.1.tar.gz', u'file_hash': u'0b0084362a8d9d7662b652ab17989a99e6ad9d4c3398ff0ce8baf3c3d07fd7ab', u'patch_name': u'test_app-mac-16', u'file_size': 6984789, u'patch_hash': u'ef74c0cfa058a202f53a7479cd3a86b36ab5500df2180aa736117a6c20ab6af9', u'patch_size': 8088}}, u'0.0.1.2.4': {u'mac': {u'filename': u'test_app-mac-0.0.1-4-g2073045.tar.gz', u'file_hash': u'bfdc578f98a6e434f619186fbdd37475338a46db1e18bead7f76760c6473de14', u'patch_name': u'test_app-mac-4', u'file_size': 6626350, u'patch_hash': u'71f7e1fa07fb90240cc62564f79e5220d14fbcf7b4092f03175e289f7ec6b780', u'patch_size': 58405}}, u'0.1.0.2.0': {u'mac': {u'file_hash': u'213666246d85363e4bf4f4c2c37db88490aa4b0074194b904ad1ca5142a21b8c', u'file_size': 6872134, u'filename': u'test_app-mac-0.1.0.tar.gz'}}, u'0.1.1.2.0': {u'mac': {u'filename': u'test_app-mac-0.1.1.tar.gz', u'file_hash': u'9f7cc385dd4e5aef69c0c1b1ebfa3b993d60c0af09e254ded9801845bc3a30e4', u'patch_name': u'test_app-mac-17', u'file_size': 6984789, u'patch_hash': u'df3a23ebc6b36e6bab0603eb36326045175f5ee471a0eee5ab9bb841bb41728e', u'patch_size': 236}}, u'0.2.0.2.0': {u'mac': {u'filename': u'test_app-mac-0.2.0.tar.gz', u'file_hash': u'2198f04f3d39eddae9b2660c8dd0b405a7b3d56d3af494a2cf4540e16d17c676', u'patch_name': u'test_app-mac-25', u'file_size': 6872134, u'patch_hash': u'b3681ebd0567d83f30d4a6e30f62f95457e8fb0ccf04c05b1a4209ff604932aa', u'patch_size': 4508}}}}}
2016-11-04 22:52:00,320 dsdev_utils.helpers DEBUG Version str: 0.1.0
2016-11-04 22:52:00,320 pyupdater.client DEBUG Checking for test_app updates...
2016-11-04 22:52:00,320 pyupdater.client.updates DEBUG Highest version: 0.2.0.2.0
2016-11-04 22:52:00,320 dsdev_utils.helpers DEBUG Version str: 0.2.0.2.0
2016-11-04 22:52:00,320 dsdev_utils.helpers DEBUG Setting release as stable. Disregard if not prerelease
2016-11-04 22:52:00,320 pyupdater.client DEBUG Current vesion: 0.1.0.2.0
2016-11-04 22:52:00,320 pyupdater.client DEBUG Latest version: 0.2.0.2.0
2016-11-04 22:52:00,321 pyupdater.client DEBUG Update Needed: True
2016-11-04 22:52:00,321 pyupdater.client.updates DEBUG Highest version: 0.2.0.2.0
2016-11-04 22:52:00,321 pyupdater.client.updates DEBUG Filename for test_app-0.1.0.2.0: test_app-mac-0.1.0.tar.gz
2016-11-04 22:52:00,321 pyupdater.client.updates DEBUG Filename for test_app-0.2.0.2.0: test_app-mac-0.2.0.tar.gz
2016-11-04 22:52:00,321 pyupdater.client.updates DEBUG Beginning removal of old updates
2016-11-04 22:52:00,321 pyupdater.package_handler.package DEBUG Filename: test_app-mac-0.1.0.tar.gz
2016-11-04 22:52:00,321 pyupdater.package_handler.package DEBUG Directory: /Users/ben/Library/Application Support/test_app/update
2016-11-04 22:52:00,321 dsdev_utils.helpers DEBUG Version str: test_app-mac-0.1.0.tar.gz
2016-11-04 22:52:00,321 dsdev_utils.helpers DEBUG Removed ".tar.gz"
2016-11-04 22:52:00,322 pyupdater.package_handler.package DEBUG /Users/ben/Library/Application Support/test_app/update/test_app-mac-0.1.0.tar.gz does not exists
2016-11-04 22:52:00,322 pyupdater.package_handler.package DEBUG Not an archive format: None
2016-11-04 22:52:00,322 dsdev_utils.paths DEBUG Changing to Directory --> /Users/ben/Library/Application Support/test_app/update
2016-11-04 22:52:00,370 pyupdater.client.downloader DEBUG Hash for binary data: 2198f04f3d39eddae9b2660c8dd0b405a7b3d56d3af494a2cf4540e16d17c676
2016-11-04 22:52:00,371 dsdev_utils.paths DEBUG Moving back to Directory --> /
2016-11-04 22:52:00,371 dsdev_utils.paths DEBUG Changing to Directory --> /Users/ben/Library/Application Support/test_app/update
2016-11-04 22:52:00,400 pyupdater.client.downloader DEBUG Hash for binary data: 2198f04f3d39eddae9b2660c8dd0b405a7b3d56d3af494a2cf4540e16d17c676
2016-11-04 22:52:00,400 pyupdater.client.updates DEBUG Extracting Update
2016-11-04 22:52:00,454 dsdev_utils.paths DEBUG Moving back to Directory --> /
2016-11-04 22:52:00,455 pyupdater.client.updates DEBUG Looks like we're dealing with a Mac Gui
2016-11-04 22:52:00,455 pyupdater.client.updates DEBUG Update Location:
/Users/ben/Library/Application Support/test_app/update
2016-11-04 22:52:00,455 pyupdater.client.updates DEBUG Update Name: test_app
2016-11-04 22:52:00,455 pyupdater.client.updates DEBUG Current App location:
/Users/ben/Projects/test_app/pyu-data/files/test_app.app
2016-11-04 22:52:00,456 pyupdater.client.updates DEBUG Moving app to new location:
/Users/ben/Projects/test_app/pyu-data/files
2016-11-04 22:52:00,457 pyupdater.client.updates DEBUG Restarting
2016-11-04 22:52:00,457 pyupdater.client.updates DEBUG Current App: /Users/ben/Projects/test_app/pyu-data/files/test_app
right now they even have a pragma: no cover
My application name contains spaces. When trying to download the zip containing the update, PyUpdater makes the following (bad) request:
"GET /updates/App name-win-1.1.zip HTTP/1.1" 400
The correct request would be:
"GET /updates/App%20name-win-1.1.zip HTTP/1.1" 200
Traceback (most recent call last):
File "foo.py", line 30, in <module>
client = Client(ClientConfig(), refresh=True)
File "pyupdater/client/__init__.py", line 150, in __init__
File "pyupdater/client/__init__.py", line 228, in init_app
File "pyupdater/client/__init__.py", line 232, in refresh
File "pyupdater/client/__init__.py", line 354, in _get_signing_key
File "ed25519/keys.py", line 142, in __init__
AssertionError
PyUpdater version 2.1.4+14.geb460aa
Python 2.7.12
macOS Sierra
Hi there,
I stumbled upon your great package.
I have a pytest plugin that I want to auto update upon test run if needed.
I couldn't figure out how I do that with pyupdater, even after reading the documentation.
Thanks
APP_NAME = 'gc'
APP_VERSION = '1.0.0'
client = Client(ClientConfig(), refresh=True)
app_update = client.update_check(APP_NAME, APP_VERSION, channel='stable')
if app_update is not None:
downloaded = app_update.download()
if downloaded is True:
app_update.extract_restart()
>>> Exception "AttributeError"
'LibUpdate' object has no attribute 'extract_restart'
File: D:\sources\python\gc\main.py, Line: 302
Hi,
after pyupdater updates the application, the App/Contents/Info.plist is set to 0.0.0
Before update:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>hoveringSombrero</string>
<key>CFBundleShortVersionString</key>
<string>4.0.0</string>
<key>CFBundleExecutable</key>
<string>MacOS/hoveringSombrero-mac</string>
<key>CFBundleName</key>
<string>hoveringSombrero</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDisplayName</key>
<string>hoveringSombrero</string>
<key>CFBundleIconFile</key>
<string>logo.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSBackgroundOnly</key>
<string>0</string>
</dict>
</plist>
After update:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict><key>CFBundleIdentifier</key>
<string>hoveringSombrero</string>
<key>CFBundleShortVersionString</key>
<string>0.0.0</string>
<key>CFBundleExecutable</key>
<string>MacOS/hoveringSombrero</string>
<key>CFBundleName</key>
<string>hoveringSombrero</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDisplayName</key>
<string>hoveringSombrero</string>
<key>CFBundleIconFile</key>
<string>logo.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSBackgroundOnly</key>
<string>0</string>
</dict>
</plist>
Hi,
I am trying to put PyUpdater to use, and I am kinda struggling to wrap my head around its concepts.
I have an wxPython-based app that needs to be built for two platforms. I managed to get spec files working, I got my runners working (GitLab CI), everything is slowly falling into place.
Now, I just started packaging and signing stuff with PYU, and I realized that .pyupdater
folder and its config.pyu
are the central source for all versions metadata, however, they don't really belong in the source code repository.
I need to build my app on two separate systems (one for macOS, one for Windows) and I want to have an alpha release for every commit made on alpha branch (and beta release on commits to beta branch, etc.) - but for this to happen, it seems I'd need to manage config.pyu
in some other way.
One idea that comes to mind is to upload config.pyu
after every successful build, and to download it before the next one - but I am not sure if this is the right way to do.
What is the proper procedure for cleaning the versions file of old version information. It seems that the proper automated way would be once the file is no longer stored in the "files" section, the corresponding entry would be deleted after a short period of time.
Hi,
Your tools seems great. I'm trying it at the moment.
I started with a simple script, test.py:
#!/usr/bin/python
# coding: utf-8
import sys
import os
print("Testing")
if __name__ == '__main__':
pass
Nothing complicated here. I then used pyinstaller test.py
to get the spec file, test.spec (I want to try pyupdater with a spec file because for I want to do next, I'll need a spec file).
Then I ran pyupdater init
, answered the questions, and ran pyupdater build --app-version 1.0 test.spec
. And here is what I got:
[INFO] PyInstaller: 3.2
[INFO] Python: 3.5.2
[INFO] Platform: Linux-4.4.19-1-MANJARO-x86_64-with-glibc2.3.4
[INFO] UPX is available.
[INFO] Extending PYTHONPATH with paths
['/home/djipey/informatique/python/updater',
'/home/djipey/informatique/python/updater']
[INFO] checking Analysis
[INFO] Building Analysis because out00-Analysis.toc is non existent
[INFO] Initializing module dependency graph...
[INFO] Initializing module graph hooks...
[INFO] Analyzing base_library.zip ...
[INFO] running Analysis out00-Analysis.toc
[INFO] Caching module hooks...
[INFO] Analyzing test.py
[INFO] Loading module hooks...
[INFO] Loading module hook "hook-encodings.py"...
[INFO] Loading module hook "hook-pydoc.py"...
[INFO] Loading module hook "hook-xml.py"...
[INFO] Looking for ctypes DLLs
[INFO] Analyzing run-time hooks ...
[INFO] Looking for dynamic libraries
[INFO] Looking for eggs
[INFO] Using Python library /usr/lib/libpython3.5m.so.1.0
[INFO] Warnings written to /home/djipey/informatique/python/updater/.pyupdater/work/test/warntest.txt
[INFO] checking PYZ
[INFO] Building PYZ because out00-PYZ.toc is non existent
[INFO] Building PYZ (ZlibArchive) /home/djipey/informatique/python/updater/.pyupdater/work/test/out00-PYZ.pyz
[INFO] checking PKG
[INFO] Building PKG because out00-PKG.toc is non existent
[INFO] Building PKG (CArchive) out00-PKG.pkg
[INFO] Bootloader /usr/lib/python3.5/site-packages/PyInstaller/bootloader/Linux-64bit/run
[INFO] checking EXE
[INFO] Building EXE because out00-EXE.toc is non existent
[INFO] Building EXE from out00-EXE.toc
[INFO] Appending archive to ELF section in EXE /home/djipey/informatique/python/updater/.pyupdater/work/test/test
[INFO] checking COLLECT
[INFO] Building COLLECT because out00-COLLECT.toc is non existent
[INFO] Removing dir /home/djipey/informatique/python/updater/pyu-data/new/test
[INFO] Building COLLECT out00-COLLECT.toc
[ERROR] [Errno 2] No such file or directory: 'nix64'
Building directly from test.py completed, but not from test.spec. What should I do to solve this ?
I have an images folder that I want to include when bundling. How can I do this?
I have notice in sample code http://www.pyupdater.org/usage-cli/ in section "Step 5 - Integrate PyUpdater" there is a APP_VERSION. Would APP_VERSION number be always the same when I used pyupdater build -F --app-version=$VERSION nix64.spec. So if I used $VERSION='1.0.12' APP_VERSION should be also '1.0.12'?
# Constants
APP_NAME = 'Acme'
APP_VERSION = '1.0'
Hi,
I'm still investigating this very promising module. I have a few questions though.
Here is what I have in my deploy
folder:
ChemBrows ChemBrows-nix64-0.9.8.tar.gz ChemBrows-nix64-0.9.9.tar.gz
ChemBrows
is the extracted executable from ChemBrows-nix64-0.9.8.tar.gz
. In the folder, there is the next version of my software. ChemBrows will simply do basic stuff for now:
client = Client(ClientConfig())
client.refresh()
client.add_progress_hook(self._printStatus)
app_update = client.update_check(client.app_name, version)
print(app_update)
I then start a local python server (python -m http.server 8000
) in the deploy folder.
When I start ChemBrows
, here is the log of the python server:
127.0.0.1 - - [27/Sep/2016 12:07:06] code 404, message File not found
127.0.0.1 - - [27/Sep/2016 12:07:06] "GET /keys.gz HTTP/1.1" 404 -
127.0.0.1 - - [27/Sep/2016 12:07:06] code 404, message File not found
127.0.0.1 - - [27/Sep/2016 12:07:06] "GET /versions.gz HTTP/1.1" 404 -
And of course, print(app_update)
returns None.
It is obvious I'm missing something here. Is it possible to have more details about how the files should be stored on the remote server, and about how to get the missing files ?
Hi,
Let's assume I have these files in the directory pyu-data/deploy
ChemBrows-nix64-0.9.9.tar.gz
ChemBrows-nix64-0.9.8.tar.gz
ChemBrows-win-0.9.9.zip
ChemBrows-win-0.9.8.zip
If I use the command pyupdater pkg --process --sign
on Windows, versions.gz will be generated with the infos about all the versions (Linux AND Windows versions).
When I use the same command on Linux, versions.gz will contain only the infos about Linux versions.
I normally develop on Linux, and I copied the directory .pyupdater
on a virtual machine running Windows.
Is it possible to sign ALL the versions, at once, on Linux ? When I'll start porting my app on OSX, it could become complicated to maintain a single file versions.gz with all the versions from the 3 OS in it.
Thanks !
Hi,
Can PyUpdater get admin rights to write in admin space ?
We discussed that a lot for Esky, but the process was kind of broken: cloudmatrix/esky#114
Let's suppose I have a wonderful software I want to ship to my Windows users. I will create a setup.exe
with Inno setup (for example). The user will then just have to run the installer.
During the install, the files will be written in Program Files
. In order to do that, the user will give admin rights to the install process (on Windows, a popup will appear and the user will just have to click on a button to agree). Finally, the user will run the program peacefully.
Now let's say I release a new version of my program. It will try to update itself through PyUpdater's API: it will try to download the new version, but the update process will fail at this step, because the program does not have sufficient permissions to write in Program Files
.
The same problem exists on Mac OS. My workaround is to trick the install process into installing the program in user space (not in Program Files
), so it never has to ask for admin rights. But I would prefer not to do that.
Is there a solution with PyUpdater ?
It would require some kind of module to ask the user his password.
Here I was found a small issue: User Guide Usage | CLI
Please change APP_VERSION = 1.0
to APP_VERSION = '1.0'
pytest-cov > 2.2.1 raises AssertionError when running tests
Issue being tracked here pytest-dev/pytest-cov#124
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.