[PyInstaller] [New feature] Making pyinstaller using system libpython

2012-04-24 Thread Matteo Baracani
The feature I want to develop is the possibility to choose whether to 
bundle or not the system libpython.
If the target computer already has a libpython, adding it to application 
is a waste of space. The idea is to add to PyInstaller the ability to 
remove the standard library from the application and use the system 
libpython.


To develop this feature I'll work on builder and bootloader: the overall 
plan is to have the builder not to bundle the libpython, and the 
bootloader to use the system libpython.


In class Analysis in module build.py it will be possible to pass a new 
parameter called use_system_library whose default value is False (in 
this case the build system libpython is bundled as usual), instead if 
the value is True the application must use the system library and the 
libpython is not included in the Analysis' results. Excluding the 
bundling of libpython will be made after the function 
fixMissingPythonLib - after the invocation of this function, we can be 
sure that the libpython has been located somehow by the build system and 
that it's already scheduled for inclusion, so it makes sense to just 
remove it from the Analysis' results at this point.


The choice whether to import or not the libpython is done in Analysis 
because this phase is always done and doing this choice after that could 
lead to code duplication, or to necessity to pass superfluous 
information (e.g. an EXE with exclude_binaries=True doesn't need the 
list of binaries, because COLLECT will collect them - so should I add 
this option as an argument to EXE, I would still have to pass it the 
full list of binaries).


To save this information I will not change the cookie structure, but 
change the value in pyvers to negative if the user wants to use the 
Python system library.


In bootloader the idea is to change the loadPython function, so that 
before throwing an error when not finding the bundled libpython, the 
function checks the presence of a system libpython (how this search is 
performed in detail depends on the operating system). In my planned 
implementation the system libpython's version must match the same that 
could be found on the build machine. If nothing is found the program 
throws an error.


If somebody wants to comment on the above, I'll gladly take your 
suggestions into account during development.


Matteo

--
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to pyinstaller@googlegroups.com.
To unsubscribe from this group, send email to 
pyinstaller+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.



Re: [PyInstaller] [New feature] Making pyinstaller using system libpython

2012-04-24 Thread Avraham Serour
I believe the same idea could be extended to any module used, for example I
could declare that my target system already has pyside or pywin32
installed, so no need to include it

On Mon, Apr 23, 2012 at 3:40 PM, Matteo Baracani b...@develer.com wrote:

 The feature I want to develop is the possibility to choose whether to
 bundle or not the system libpython.
 If the target computer already has a libpython, adding it to application
 is a waste of space. The idea is to add to PyInstaller the ability to
 remove the standard library from the application and use the system
 libpython.

 To develop this feature I'll work on builder and bootloader: the overall
 plan is to have the builder not to bundle the libpython, and the bootloader
 to use the system libpython.

 In class Analysis in module build.py it will be possible to pass a new
 parameter called use_system_library whose default value is False (in this
 case the build system libpython is bundled as usual), instead if the value
 is True the application must use the system library and the libpython is
 not included in the Analysis' results. Excluding the bundling of libpython
 will be made after the function fixMissingPythonLib - after the invocation
 of this function, we can be sure that the libpython has been located
 somehow by the build system and that it's already scheduled for inclusion,
 so it makes sense to just remove it from the Analysis' results at this
 point.

 The choice whether to import or not the libpython is done in Analysis
 because this phase is always done and doing this choice after that could
 lead to code duplication, or to necessity to pass superfluous information
 (e.g. an EXE with exclude_binaries=True doesn't need the list of binaries,
 because COLLECT will collect them - so should I add this option as an
 argument to EXE, I would still have to pass it the full list of binaries).

 To save this information I will not change the cookie structure, but
 change the value in pyvers to negative if the user wants to use the Python
 system library.

 In bootloader the idea is to change the loadPython function, so that
 before throwing an error when not finding the bundled libpython, the
 function checks the presence of a system libpython (how this search is
 performed in detail depends on the operating system). In my planned
 implementation the system libpython's version must match the same that
 could be found on the build machine. If nothing is found the program throws
 an error.

 If somebody wants to comment on the above, I'll gladly take your
 suggestions into account during development.

 Matteo

 --
 You received this message because you are subscribed to the Google Groups
 PyInstaller group.
 To post to this group, send email to pyinstaller@googlegroups.com.
 To unsubscribe from this group, send email to pyinstaller+unsubscribe@**
 googlegroups.com pyinstaller%2bunsubscr...@googlegroups.com.
 For more options, visit this group at http://groups.google.com/**
 group/pyinstaller?hl=en http://groups.google.com/group/pyinstaller?hl=en
 .



-- 
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to pyinstaller@googlegroups.com.
To unsubscribe from this group, send email to 
pyinstaller+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.



Re: [PyInstaller] [New feature] Making pyinstaller using system libpython

2012-04-24 Thread Hartmut Goebel
Am 23.04.2012 14:40, schrieb Matteo Baracani:
 If somebody wants to comment on the above, I'll gladly take your
 suggestions into account during development.

To be frank: I don't think this is a feature for PyInstaller.

1) PyInstaller is aiming to freeze *everything* required for executing
the program to make it self-contained and independent of any installed
Python version.

2) Only excluding the libpython does not make that much sense. One would
want to exclude all standard modules, too. This would really save space.

3) If you rely on an installed libpython, you can even rely on a
complete standard Python installation. So you not even need the
bootloader but just fire up the python executable.

You idea sound more like a solution to use `pip bundle`, virtualenv  and
some simple install script (which can be written in Python). Or like
buildout and other solutions in this area.

I suggest you to rethink your aims. Saving space on a somewhat current
hard-disk is not worth spending time. If you are going for a embedded
system, things are different. But in this case but you should know hat's
on the system and not need PyInstaller.

-- 
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult 
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de




smime.p7s
Description: S/MIME Kryptografische Unterschrift


[PyInstaller] Re: [New feature] Making pyinstaller using system libpython

2012-04-24 Thread David Cortesi
 If somebody wants to comment on the above, I'll gladly take your
 suggestions into account during development.

Sounds like a bad idea. It makes the bundled app dependent on the
content of the user's system. Suppose that's a different level of
Python -- 3.x when the program is 2.x (or vice versa), or simply 2.6
when the developer expected 2.7? When everything is bundled, there is
no doubt about compatibility. A whole family of possible trouble
reports is eliminated.

Second, the developer now has to make TWO binary distributions (per
target platform!). One small one that uses local libpython, but
another bigger one for the user who has not installed python. Or else
you have to require the user to install python, which for many users
is a stumbling block.

Stay with the model that a bundled app is complete and stand-alone.
Here, take my app and run it. No command line. No other website to
visit. Only the one download. Just unzip it and go. This is a
beautiful advantage. Who cares about an extra few megabytes?

-- 
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to pyinstaller@googlegroups.com.
To unsubscribe from this group, send email to 
pyinstaller+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.



Re: [PyInstaller] No handlers could be found for logger “OpenGL.arrays.arraydatatype”

2012-04-24 Thread Martin Zibricky
Yifei Li píše v Čt 19. 04. 2012 v 14:23 -0400:
 Hi,
 
 Could someone please look into this issue? Thanks
 
 Yifei

With the following code and OpenGL_accelerate installed

import logging
logging.basicConfig()

from OpenGL.GL import *


I've got some opengl warnings:

WARNING:OpenGL.arrays.arraydatatype:Unable to load ArrayDatatype
accelerator from OpenGL_accelerate
WARNING:OpenGL.arrays.nones:Unable to load nones_formathandler
accelerator from OpenGL_accelerate
WARNING:OpenGL.arrays.numpymodule:Unable to load numpy_formathandler
accelerator from OpenGL_accelerate


It seems to me like some modules or libraries (dependencies) are missing
for the accelerate modules.

-- 
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to pyinstaller@googlegroups.com.
To unsubscribe from this group, send email to 
pyinstaller+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.



[PyInstaller] Re: [New feature] Making pyinstaller using system libpython

2012-04-24 Thread Don Dwiggins
This seems in a way like an extension of the MERGE idea.  If you're 
going to be installing many PyI-built executables on a target machine, 
you'd rather not have to pay double/triple/... for all the supporting 
stuff.  This isn't just an issue of size on the target machine -- it 
includes the cost of copying the install file (once per install), and 
the cost of deploying all the pieces in the two-step execution process 
(once per execution).


(Thinking out loud...) In a scenario like this, it might be worth 
defining a target machine configuration file that would be used both 
by the builder and bootloader.  The former would omit the pieces that 
the file claims are on the target machine, and the bootloader would 
check that they're where the file specifies them to be.


Actually, this calls for another facility to be used on the target 
machine to validate the configuration -- this could be done by the 
bootloader, but really doesn't need to be done at each execution; 
presumably, the configuration won't change that often, so the bootload 
wouldn't need to spend the time checking it.  It could even be extended 
to be a separate executable that contains the pieces, and ensures that 
they exist at the specified locations.


Again, this assumes installing on a target machine where you (actually, 
the installer that you built with NSIS or whatever) might have limited 
control -- enough to install your applications, but not necessarily 
enough to say OK, let's just install Python x.y, wxPython z.w, etc.


For what it's worth.


On 4/24/12 3:21 AM, Hartmut Goebel wrote:

Am 23.04.2012 14:40, schrieb Matteo Baracani:

If somebody wants to comment on the above, I'll gladly take your
suggestions into account during development.

To be frank: I don't think this is a feature for PyInstaller.

1) PyInstaller is aiming to freeze *everything* required for executing
the program to make it self-contained and independent of any installed
Python version.

2) Only excluding the libpython does not make that much sense. One would
want to exclude all standard modules, too. This would really save space.

3) If you rely on an installed libpython, you can even rely on a
complete standard Python installation. So you not even need the
bootloader but just fire up the python executable.

You idea sound more like a solution to use `pip bundle`, virtualenv  and
some simple install script (which can be written in Python). Or like
buildout and other solutions in this area.

I suggest you to rethink your aims. Saving space on a somewhat current
hard-disk is not worth spending time. If you are going for a embedded
system, things are different. But in this case but you should know hat's
on the system and not need PyInstaller.



--

Don Dwiggins
Advanced Publishing Technology


--
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to pyinstaller@googlegroups.com.
To unsubscribe from this group, send email to 
pyinstaller+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.



[PyInstaller] [pyinstaller/pyinstaller] a98435: Fix: Add hook for OpenGL_accelerate module. This m...

2012-04-24 Thread Martin Zibricky
  Branch: refs/heads/develop
  Home:   https://github.com/pyinstaller/pyinstaller
  Commit: a984357d49825f1831e3933968e67447fca9a07e
  
https://github.com/pyinstaller/pyinstaller/commit/a984357d49825f1831e3933968e67447fca9a07e
  Author: Martin Zibricky mzibr.pub...@gmail.com
  Date:   2012-04-24 (Tue, 24 Apr 2012)

  Changed paths:
A PyInstaller/hooks/hook-OpenGL_accelerate.py

  Log Message:
  ---
  Fix: Add hook for OpenGL_accelerate module. This module speeds up pyOpenGL.


  Commit: 5f2993e41d2584d9c5040dfddb79ddb17d45e87a
  
https://github.com/pyinstaller/pyinstaller/commit/5f2993e41d2584d9c5040dfddb79ddb17d45e87a
  Author: Martin Zibricky mzibr.pub...@gmail.com
  Date:   2012-04-24 (Tue, 24 Apr 2012)

  Changed paths:
M source/common/launch.c

  Log Message:
  ---
  Merge branch 'develop' of github.com:pyinstaller/pyinstaller into develop


Compare: https://github.com/pyinstaller/pyinstaller/compare/4c90fa4...5f2993e

-- 
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to pyinstaller@googlegroups.com.
To unsubscribe from this group, send email to 
pyinstaller+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.