Code Monkey home page Code Monkey logo

osnap's People

Contributors

jamesabel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

osnap's Issues

use balsa for logging

With the current code, appdirs should be added to setup.py. But it would be better to just use balsa.

OSNAP not compatible with the version of windows I'm running

I'm running windows 10 on a VM on a mac.

It's 32-bit on an x86-based processor.

I ran

python -m osnap.osnapy

using python 3.5.2 I get the following:

Z:\temp>python -m osnap.osnapy
get https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip to cache\python-3.5.2-embed-amd64.zip
Traceback (most recent call last):
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\runpy.py", line 184, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\site-packages\osnap\osnapy.py", line 54, in
main()
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\site-packages\osnap\osnapy.py", line 51, in main
make_osnapy(args.python_version, args.application, args.clear, args.verbose, args.egenix_pyrun, args.force_uninstall)
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\site-packages\osnap\osnapy.py", line 30, in make_osnapy
osnapy.create_python()
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\site-packages\osnap\osnapy_win.py", line 58, in create_python
subprocess.check_call(cmd)
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 576, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in init
restore_signals, start_new_session)
File "C:\Users\Eli Ribble\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
OSError: [WinError 216] This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher

Z:\temp>

System keeps on chugging even if you don't have main.py

I accidentally ran the installer builder when my script was called 'goo.py' rather than 'main.py'. It still produced an exe and an installer. I had to dig through the output to notice that it emitted an error log indicating I didn't have main.py. it'd probably be best to fail the whole process at that point so users don't waste time as I did looking at the produced output that will never work

osnap doesn't indicate that files are required before trying to use them

I'm slowly working my way through getting this project working and hitting some stuff that's a little frustrating. OSNAP does a bunch of processing before getting around to a cryptic stack trace about the failure rather than checking upfront if everything it needs is there. This includes:

a directory named the same as my application name that it wants to copy. In my case my sample application is called 'goo' and it wants a folder named 'goo'. It was happy as soon as I added one with an empty init.py in it

a LICENSE file. Also can be empty, I think
an icon file, again, based on the name of the application. Such as 'goo.ico'
NSIS installed at C:\Program Files (x86)\NSIS\makensis.exe

Allow users to skip creating an NSIS installer

I have no need for an NSIS installer when I build because I use my own WiX installer. I'd like to avoid the requirement of having NSIS installed on my build machine. Let's create a commandline switch to disable the NSIS installer. This will maintain the current default behavior but just optionally disable this step of the packaging process

Unable to find packagesbuild

Perhaps I missed it in the documentation but I didn't see anything about installing whatever packages build is. On OSX El Capitan I get the following exception.

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '/usr/local/bin/packagesbuild pathlt.pkgproj' returned non-zero exit status 127

After a little bit of googling around it looks like this is or was part of xcode. I have xcode installed but this doesn't seem to be on my system. The docs should probably call this out explicitly with some installation instructions similar to NSIS

What makes OSNAP different from py2exe?

While I was working on the project I noticed that OSNAP uses py2exe under the covers. I don't think that's really a problem, but my initial review of the technology led me to think that OSNAP was a simpler replacement for py2exe using the new embeddable python shipped with recent Python 3. Now I'm not so sure. What are the advantages of the project over using py2exe directly?

You can consider this issue a request for documentation, but mostly I just wanted to talk to you about it since I'm in the process of evaluating exactly which way our company will go with freezing technology for our next project and I want to make an informed decision.

Can't figure out the __version__ option

I am trying to package an app, but I keep getting an error about version
PycharmProjects/qt-projects/PyQt-projects/SR/osnap_setup.py", line 9, in make_installer
[APPLICATION_NAME], main_app.version, verbose=verbose)
AttributeError: module 'main_app' has no attribute 'version'

OSNAP should be able to build 32-bit binaries on 64-bit systems

Currently OSNAP uses launchwin as the underlying bootstrapping process for executables it produces. launchwin is checked in to git as a 64-bit binary. In many situations it's nice to build a 32-bit binary on a 64-bit machine so that the binary will work correctly on a broader base of windows installations. OSNAP should support an option to build a 32-bit binary by force no matter what the system architecture is. This will mean maintaining two different versions of launchwin for bootstrapping in the repository

Can't open output file

Hey I'm trying to build an installer for this code.

https://github.com/Siecje/qml-testing/tree/osnap

Full steps are in the README.md of the repo

(osnap) C:\Users\cody\Desktop\qml-testing>python build.py
clearing and making dist (C:\Users\cody\Desktop\qml-testing\dist)
done making dist (C:\Users\cody\Desktop\qml-testing\dist)
unzipping C:\Users\cody\Desktop\osnap\Scripts\..\osnap\launchwin.zip to dist
copying app to dist\osnapp\app
copying osnapy to dist\osnapp\osnapy
copying main.py to dist\osnapp
moving dist\launch.exe to dist\app.exe
writing app.nsis
['c:\\Program Files (x86)\\NSIS\\makensis', 'app.nsis']
Processing config: c:\Program Files (x86)\NSIS\nsisconf.nsh
Processing script file: "app.nsis" (ACP)
warning: LicenseData: empty license file "LICENSE"
 (app.nsis:18)
warning: unknown variable/constant "{INSTALLSIZE}" detected, ignoring (app.nsis:76)

Processed 1 file, writing output (x86-ansi):

Output: "C:\Users\cody\Desktop\qml-testing\installers\app_installer.exe"
Can't open output file
Error - aborting creation process
Traceback (most recent call last):
  File "build.py", line 12, in <module>
    make_installer(True)
  File "build.py", line 9, in make_installer
    [APPLICATION_NAME], '1.0.0', verbose=verbose)
  File "C:\Users\cody\Desktop\osnap\lib\site-packages\osnap\installer.py", line 148, in make_installer
    subprocess.check_call(pkgproj_command)
  File "C:\Users\cody\Anaconda3\lib\subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\Program Files (x86)\\NSIS\\makensis', 'app.nsis']' returned non-zero exit status 1

Version IndexError

The code and build steps can be found here https://github.com/Siecje/qml-testing/tree/osnap

When I run build.py I get the following error.


(osnap) C:\Users\cody\qml-testing>python build.py
removing dist (C:\Users\cody\qml-testing\dist)
making dist (C:\Users\cody\qml-testing\dist)
removing installers (C:\Users\cody\qml-testing\installers)
making installers (C:\Users\cody\qml-testing\installers)
unzipping c:\users\cody\osnap\lib\site-packages\osnap\launchwin.zip to dist
copying main.py to dist\osnapp
moving dist\launch.exe to dist\app.exe
Traceback (most recent call last):
  File "build.py", line 12, in <module>
    make_installer(True)
  File "build.py", line 9, in make_installer
    [APPLICATION_NAME], '1.0.0', verbose=verbose)
  File "C:\Users\cody\osnap\lib\site-packages\osnap\installer.py", line 21, in make_installer
    installer.make_installer()
  File "C:\Users\cody\osnap\lib\site-packages\osnap\installer_win.py", line 58, in make_installer
    nsis_defines['VERSIONMINOR'] = v[1]
IndexError: list index out of range

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.