def main(): if sys.platform.startswith('win'): base = 'Win32GUI' target_name = 'qutebrowser.exe' else: base = None target_name = 'qutebrowser' bdist_msi_options = { # random GUID generated by uuid.uuid4() 'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}', 'add_to_path': False, } try: setupcommon.write_git_file() cx.setup( executables=[get_exe(base, target_name)], options={ 'build_exe': get_build_exe_options(), 'bdist_msi': bdist_msi_options, }, **setupcommon.setupdata ) finally: path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') if os.path.exists(path): os.remove(path)
def main(): if sys.platform.startswith('win'): base = 'Win32GUI' target_name = 'qutebrowser.exe' else: base = None target_name = 'qutebrowser' bdist_msi_options = { # random GUID generated by uuid.uuid4() 'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}', 'add_to_path': False, } try: setupcommon.write_git_file() cx.setup(executables=[get_exe(base, target_name)], options={ 'build_exe': get_build_exe_options(), 'bdist_msi': bdist_msi_options, }, **setupcommon.setupdata) finally: path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') if os.path.exists(path): os.remove(path)
def main(): """Main entry point.""" if sys.platform.startswith('win'): base = 'Win32GUI' target_name = 'qutebrowser.exe' else: base = None target_name = 'qutebrowser' bdist_msi_options = { # random GUID generated by uuid.uuid4() 'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}', 'add_to_path': False, } bdist_dmg_options = { 'applications_shortcut': True, } bdist_mac_options = { 'qt_menu_nib': os.path.join(BASEDIR, 'misc', 'qt_menu.nib'), 'iconfile': os.path.join(BASEDIR, 'icons', 'qutebrowser.icns'), 'bundle_name': 'qutebrowser', } try: setupcommon.write_git_file() cx.setup( executables=[get_exe(base, target_name)], options={ 'build_exe': get_build_exe_options(), 'bdist_msi': bdist_msi_options, 'bdist_mac': bdist_mac_options, 'bdist_dmg': bdist_dmg_options, }, **setupcommon.setupdata ) finally: path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') if os.path.exists(path): os.remove(path)
def main(): """Main entry point.""" if sys.platform.startswith('win'): base = 'Win32GUI' target_name = 'qutebrowser.exe' else: base = None target_name = 'qutebrowser' bdist_msi_options = { # random GUID generated by uuid.uuid4() 'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}', 'add_to_path': False, } bdist_dmg_options = { 'applications_shortcut': True, } bdist_mac_options = { 'qt_menu_nib': os.path.join(BASEDIR, 'misc', 'qt_menu.nib'), 'iconfile': os.path.join(BASEDIR, 'icons', 'qutebrowser.icns'), 'bundle_name': 'qutebrowser', } try: setupcommon.write_git_file() cx.setup(executables=[get_exe(base, target_name)], options={ 'build_exe': get_build_exe_options(), 'bdist_msi': bdist_msi_options, 'bdist_mac': bdist_mac_options, 'bdist_dmg': bdist_dmg_options, }, **setupcommon.setupdata) finally: path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') if os.path.exists(path): os.remove(path)
def main(): """Main entry point.""" if sys.platform.startswith("win"): base = "Win32GUI" target_name = "qutebrowser.exe" else: base = None target_name = "qutebrowser" bdist_msi_options = { # random GUID generated by uuid.uuid4() "upgrade_code": "{a7119e75-4eb7-466c-ae0d-3c0eccb45196}", "add_to_path": False, } bdist_dmg_options = {"applications_shortcut": True} bdist_mac_options = { "qt_menu_nib": os.path.join(BASEDIR, "misc", "qt_menu.nib"), "iconfile": os.path.join(BASEDIR, "icons", "qutebrowser.icns"), "bundle_name": "qutebrowser", } try: setupcommon.write_git_file() cx.setup( executables=[get_exe(base, target_name)], options={ "build_exe": get_build_exe_options(), "bdist_msi": bdist_msi_options, "bdist_mac": bdist_mac_options, "bdist_dmg": bdist_dmg_options, }, **setupcommon.setupdata ) finally: path = os.path.join(BASEDIR, "qutebrowser", "git-commit-id") if os.path.exists(path): os.remove(path)
Args: name: The name of the argument to get. Return: The value of the argument. """ field_re = re.compile(r'__{}__\s+=\s+(.*)'.format(re.escape(name))) path = os.path.join(BASEDIR, 'qutebrowser', '__init__.py') line = field_re.search(read_file(path)).group(1) value = ast.literal_eval(line) return value try: common.write_git_file() setuptools.setup( packages=setuptools.find_packages(exclude=['scripts', 'scripts.*']), include_package_data=True, entry_points={ 'gui_scripts': ['qutebrowser = qutebrowser.qutebrowser:main'] }, zip_safe=True, install_requires=[ 'jinja2', 'PyYAML', 'dataclasses; python_version < "3.7"', 'importlib_resources>=1.1.0; python_version < "3.9"' ], python_requires='>=3.6', name='qutebrowser', version=_get_constant('version'), description=_get_constant('description'),
build_exe_options['include_files'].append((egl_path, 'libEGL.dll')) bdist_msi_options = { # random GUID generated by uuid.uuid4() 'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}', 'add_to_path': False, } base = 'Win32GUI' if sys.platform.startswith('win') else None executable = cx.Executable('qutebrowser/__main__.py', base=base, targetName='qutebrowser.exe', shortcutName='qutebrowser', shortcutDir='ProgramMenuFolder') try: setupcommon.write_git_file() cx.setup( executables=[executable], options={ 'build_exe': build_exe_options, 'bdist_msi': bdist_msi_options, }, **setupcommon.setupdata ) finally: if BASEDIR is not None: path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') if os.path.exists(path): os.remove(path)
import os import os.path from scripts import setupcommon as common import setuptools try: BASEDIR = os.path.dirname(os.path.realpath(__file__)) except NameError: BASEDIR = None try: common.write_git_file() setuptools.setup( packages=setuptools.find_packages(exclude=['scripts', 'scripts.*']), include_package_data=True, entry_points={'gui_scripts': ['qutebrowser = qutebrowser.qutebrowser:main']}, test_suite='qutebrowser.test', zip_safe=True, install_requires=['pypeg2', 'jinja2', 'pygments', 'PyYAML'], **common.setupdata ) finally: if BASEDIR is not None: path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') if os.path.exists(path): os.remove(path)