source: OpenRLabs-Git/deploy/rlabs-docker/web2py-rlabs/scripts/standalone_exe_cxfreeze.py @ 42095c5

mainqndtest v1.1.1
Last change on this file since 42095c5 was 42bd667, checked in by David Fuertes <dfuertes@…>, 4 years ago

Historial Limpio

  • Property mode set to 100755
File size: 1.7 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4"""
5Usage:
6    Install cx_Freeze: http://cx-freeze.sourceforge.net/
7    Copy script to the web2py directory
8    c:\Python27\python standalone_exe_cxfreeze.py build_exe
9"""
10from cx_Freeze import setup, Executable
11from gluon.import_all import base_modules, contributed_modules
12from gluon.fileutils import readlines_file
13from glob import glob
14import fnmatch
15import os
16import shutil
17import sys
18import re
19
20#read web2py version from VERSION file
21web2py_version_line = readlines_file('VERSION')[0]
22#use regular expression to get just the version number
23v_re = re.compile('[0-9]+\.[0-9]+\.[0-9]+')
24web2py_version = v_re.search(web2py_version_line).group(0)
25
26base = None
27
28if sys.platform == 'win32':
29    base = "Win32GUI"
30
31base_modules.remove('macpath')
32buildOptions = dict(
33    compressed=True,
34    excludes=["macpath", "PyQt4"],
35    includes=base_modules,
36    include_files=[
37        'applications',
38        'ABOUT',
39        'LICENSE',
40        'VERSION',
41        'logging.example.conf',
42        'options_std.py',
43        'app.example.yaml',
44        'queue.example.yaml',
45    ],
46    # append any extra module by extending the list below -
47    # "contributed_modules+["lxml"]"
48    packages=contributed_modules,
49)
50
51setup(
52    name="Web2py",
53    version=web2py_version,
54    author="Massimo DiPierro",
55    description="web2py web framework",
56    license="LGPL v3",
57    options=dict(build_exe=buildOptions),
58    executables=[Executable("web2py.py",
59                            base=base,
60                            compress=True,
61                            icon="web2py.ico",
62                            targetName="web2py.exe",
63                            copyDependentFiles=True)],
64)
Note: See TracBrowser for help on using the repository browser.