zhangbignzhen / robotframework-autoitlibrary

Automatically exported from code.google.com/p/robotframework-autoitlibrary
Apache License 2.0
0 stars 1 forks source link

Installation of "PIL" is not silent. #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The installation of "PIL" requires user intervention to install
Not allowed the automation of Environments

Original issue reported on code.google.com by jrvi...@gmail.com on 19 Nov 2009 at 8:53

GoogleCodeExporter commented 8 years ago
I included the installation of PIL with AutoItLibrary to simplify the 
installation
process for new users.  I am aware of the limitations of this.  What would you
suggest to solve this?  Would you prefer that users of AutoItLibrary be told to 
find
and install their own version of PIL (I think that would be the simplest 
solution)?

Original comment by c.martin...@gmail.com on 20 Nov 2009 at 2:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
In case it is necessary to use "PIL" and that the installation itself can not
satisfy,this  must be treated as a prerequisite to the installation, if 
necessary
facilitating the download url.

Original comment by jrvi...@gmail.com on 20 Nov 2009 at 5:29

GoogleCodeExporter commented 8 years ago
Add, In  the Project Home, in the section prerequisitos , 
    * Install PIL for http://www.pythonware.com/products/pil/
Prerequisites

    * Install Python and Robot Framework
    * If you are not using ActivePython, which comes with the Python for Windows
extensions such as win32com, then you'll need to install Mark Hammond's Python 
for
Windows Extensions.
    * Download the latest AutoItLibrary release 

Original comment by jrvi...@gmail.com on 20 Nov 2009 at 5:35

GoogleCodeExporter commented 8 years ago
Sorry about my way of expression, is an automatic traducion google.

Original comment by jrvi...@gmail.com on 20 Nov 2009 at 5:37

GoogleCodeExporter commented 8 years ago
I think PIL installation should be a separate step. That way you don't need to 
think
about different Python versions (issue 4), where to install it, have people 
perhaps
installed PIL to some custom location, etc. You'll also have one less 
dependency to
handle yourself.

Do I got it right that PIL is required only by some keywords to take 
screenshots? If
yes, then I recommend you to make PIL installation fully optional. Something 
like
below ought to work - if you want I can test this approach myself and create a 
patch.

try:
    import PIL
except ImportError
    PIL = None

# later in the code: 
def _take_screenshot(...):
    if not PIL:
        raise RuntimeError('PIL required')
    ...

Original comment by pekka.klarck on 22 Nov 2009 at 11:55

GoogleCodeExporter commented 8 years ago
It might actually be better to just write a message to log when PIL is not 
installed
instead of raising an exception. That way you could run tests also w/o PIL even 
if
they took screenshots. You could even use WARN level, at least with the first
message, to make it more visible that screenshots are not enabled. Below is an
example how to handle this:

def _take_screenshot(...):
    if not PIL:
        level = 'INFO' if self._warned_about_missing_pil else 'WARN'
        print '*%s* Python Imaging Library (PIL) is required ...' % level
        self._warned_about_missing_pil = True
        return
    ...

Original comment by pekka.klarck on 23 Nov 2009 at 12:05

GoogleCodeExporter commented 8 years ago
This request and suggested solution will be considered for the next release.

Original comment by c.martin...@gmail.com on 5 Mar 2010 at 2:46

GoogleCodeExporter commented 8 years ago
Cool! When are you planning to create a new release? You might want to inform
rf-users beforehand in case people have further enhancements in their mind.

Original comment by pekka.klarck on 7 Mar 2010 at 9:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
In AutoItLibrary 1.1, PIL is an optional install that users have to do 
themselves.

Original comment by c.martin...@gmail.com on 23 Apr 2010 at 7:41

GoogleCodeExporter commented 8 years ago

Original comment by c.martin...@gmail.com on 23 Apr 2010 at 8:06