Files
phantomjs/python/tools/setup.py
T
IceArmy a313d1befd PyPhantomJS version 1.2.0
Refactored most of functionalities to WebPage object
WebPage object can have settings
Support different HTTP operations for loading a page
Simplify buffer handling in render()
Refactor render(), split the buffer rendering to its own function
Render the web page using the tiling approach
WebPage callback for it's console message
Make exit() synchronous
WebPage callback for its JS alert
Updated all examples
2011-05-31 16:23:06 -07:00

55 lines
1.6 KiB
Python

#!/usr/bin/env python
'''
This file is part of the PyPhantomJS project.
Copyright (C) 2011 James Roe <roejames12@hotmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
import sys
# hack to import parent module(s)
sys.path = sys.path + ['..']
from utils import version
try:
from cx_Freeze import setup, Executable
except ImportError:
sys.exit('cx_Freeze must be installed to use this script')
if sys.platform.startswith('win'):
try:
from win32verstamp import stamp
except ImportError:
from time import sleep
print '*** WARNING ***'
print 'the script will be unable to create the version resource'
print 'install pywin32 extensions if you want the file stamped'
sleep(2)
exe = Executable(
script = '../pyphantomjs.py',
icon = '../resources/pyphantomjs-icon.ico'
)
setup(
name = 'PyPhantomJS',
version = version,
description = 'Minimalistic, headless, WebKit-based, JavaScript-driven tool',
executables = [exe]
)