Skip to content

Instantly share code, notes, and snippets.

@motatoes
Created July 11, 2021 17:30
Show Gist options
  • Save motatoes/586ebba7e8666e19e337a045842439b1 to your computer and use it in GitHub Desktop.
Save motatoes/586ebba7e8666e19e337a045842439b1 to your computer and use it in GitHub Desktop.
TEST
=====
```
@pytest.mark.darwin
def test_osx_app_console_option(tmpdir, pyi_builder_spec, monkeypatch):
# -*- mode: python ; coding: utf-8 -*-
app_path = os.path.join(tmpdir, 'dist',
'osx console option.app')
is_console_path = os.path.join(tmpdir, 'dist', 'itsaconsole.txt')
pyi_builder_spec.test_spec('osx_console_option.spec')
# First run using 'open' registers custom protocol handler
subprocess.check_call(['open', app_path])
# 'open' starts program in a different process
# so we need to wait for it to finish
time.sleep(5)
assert os.path.exists(is_console_path), 'did not find confirmation that \
.app is running in console mode'
```
TRACEBACK
==========
```
✗ pytest tests/functional -k test_osx_app_console_option
============================================================ test session starts ============================================================
platform darwin -- Python 3.9.5, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /Users/mohamedsayed/.pyenvs/py3/bin/python3
cachedir: .pytest_cache
rootdir: /Users/mohamedsayed/dev/pyinstaller, configfile: setup.cfg
plugins: flaky-3.7.0, xdist-2.3.0, drop-dup-tests-0.3.0, timeout-1.4.2, forked-1.3.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 552 items / 551 deselected / 1 selected
tests/functional/test_basic.py::test_osx_app_console_option FAILED [100%]
================================================================= FAILURES ==================================================================
________________________________________________________ test_osx_app_console_option ________________________________________________________
tmpdir = local('/private/var/folders/4c/gbt16tx15lgggbfqpjrnlgjr0000gn/T/pytest-of-mohamedsayed/pytest-11/test_osx_app_console_option0')
pyi_builder_spec = <PyInstaller.utils.conftest.AppBuilder object at 0x118d96f40>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x118d96f10>
@pytest.mark.darwin
def test_osx_app_console_option(tmpdir, pyi_builder_spec, monkeypatch):
# -*- mode: python ; coding: utf-8 -*-
app_path = os.path.join(tmpdir, 'dist',
'osx console option.app')
is_console_path = os.path.join(tmpdir, 'dist', 'itsaconsole.txt')
> pyi_builder_spec.test_spec('osx_console_option.spec')
/Users/mohamedsayed/dev/pyinstaller/tests/functional/test_basic.py:394:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/utils/conftest.py:464: in _test_building
pyi_main.run(pyi_args, PYI_CONFIG)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/__main__.py:114: in run
run_build(pyi_config, spec_file, **vars(args))
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/__main__.py:65: in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/building/build_main.py:720: in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/building/build_main.py:667: in build
exec(code, spec_namespace)
/Users/mohamedsayed/dev/pyinstaller/tests/functional/specs/osx_console_option.spec:7: in <module>
a = Analysis(['../scripts/osx console option.py'])
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/building/build_main.py:242: in __init__
self.__postinit__()
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/building/datastruct.py:160: in __postinit__
self.assemble()
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/building/build_main.py:419: in assemble
self.graph.process_post_graph_hooks()
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/depend/analysis.py:367: in process_post_graph_hooks
module_hook.post_graph()
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/depend/imphook.py:454: in post_graph
self._process_hidden_imports()
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/depend/imphook.py:511: in _process_hidden_imports
self.module_graph.import_hook(import_module_name, caller)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:1498: in import_hook
target_module = self._load_tail(target_package, target_module_partname)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:1717: in _load_tail
submodule = self._safe_import_module(head, mname, submodule)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/depend/analysis.py:441: in _safe_import_module
return super(PyiModuleGraph, self)._safe_import_module(
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:2066: in _safe_import_module
module = self._load_module(module_name, pathname, loader)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:2174: in _load_module
self._scan_code(m, co, co_ast)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:2658: in _scan_code
self._process_imports(module)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:2857: in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:2311: in _safe_import_hook
target_modules = self.import_hook(
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:1498: in import_hook
target_module = self._load_tail(target_package, target_module_partname)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:1717: in _load_tail
submodule = self._safe_import_module(head, mname, submodule)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/depend/analysis.py:431: in _safe_import_module
hook_module.pre_safe_import_module(hook_api)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-setuptools.extern.six.moves.py:43: in pre_safe_import_module
api.add_alias_module(real_module_name, six_module_name)
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/depend/imphookapi.py:186: in add_alias_module
self._module_graph.alias_module(real_module_name, alias_module_name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <PyiModuleGraph>, src_module_name = 'setuptools._vendor.six.moves.urllib', trg_module_name = 'setuptools.extern.six.moves.urllib'
def alias_module(self, src_module_name, trg_module_name):
"""
Alias the source module to the target module with the passed names.
This method ensures that the next call to findNode() given the target
module name will resolve this alias. This includes importing and adding
a graph node for the source module if needed as well as adding a
reference from the target to source module.
Parameters
----------
src_module_name : str
Fully-qualified name of the existing **source module** (i.e., the
module being aliased).
trg_module_name : str
Fully-qualified name of the non-existent **target module** (i.e.,
the alias to be created).
"""
self.msg(3, 'alias_module "%s" -> "%s"' % (src_module_name, trg_module_name))
# print('alias_module "%s" -> "%s"' % (src_module_name, trg_module_name))
assert isinstance(src_module_name, str), '"%s" not a module name.' % str(src_module_name)
assert isinstance(trg_module_name, str), '"%s" not a module name.' % str(trg_module_name)
# If the target module has already been added to the graph as either a
# non-alias or as a different alias, raise an exception.
trg_module = self.findNode(trg_module_name)
if trg_module is not None and not (
isinstance(trg_module, AliasNode) and
trg_module.identifier == src_module_name):
> raise ValueError(
'Target module "%s" already imported as "%s".' % (
trg_module_name, trg_module))
E ValueError: Target module "setuptools.extern.six.moves.urllib" already imported as "AliasNode('setuptools.extern.six.moves.urllib', "'setuptools._vendor.six.moves'")".
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/lib/modulegraph/modulegraph.py:1936: ValueError
------------------------------------------------------------ Captured log setup -------------------------------------------------------------
INFO PyInstaller.depend.analysis:analysis.py:796 Initializing module dependency graph...
INFO PyInstaller.depend.analysis:analysis.py:136 Caching module graph hooks...
INFO PyInstaller.depend.analysis:analysis.py:279 Analyzing base_library.zip ...
DEBUG PyInstaller.utils.hooks:__init__.py:540 Collecting submodules for collections
DEBUG PyInstaller.utils.hooks:__init__.py:612 collect_submodules - Found submodules: {'collections.abc', 'collections'}
DEBUG PyInstaller.utils.hooks:__init__.py:540 Collecting submodules for encodings
DEBUG PyInstaller.utils.hooks:__init__.py:612 collect_submodules - Found submodules: {'encodings.mbcs', 'encodings.cp1026', 'encodings.cp037', 'encodings.utf_32_be', 'encodings.mac_greek', 'encodings.raw_unicode_escape', 'encodings.base64_codec', 'encodings.cp874', 'encodings.cp737', 'encodings.mac_roman', 'encodings.iso8859_6', 'encodings.zlib_codec', 'encodings.cp932', 'encodings.cp858', 'encodings.mac_latin2', 'encodings.aliases', 'encodings.koi8_r', 'encodings.iso2022_kr', 'encodings.iso8859_1', 'encodings.latin_1', 'encodings.idna', 'encodings.euc_jp', 'encodings.mac_turkish', 'encodings.cp856', 'encodings.mac_farsi', 'encodings.iso8859_14', 'encodings.tis_620', 'encodings.bz2_codec', 'encodings.mac_cyrillic', 'encodings.oem', 'encodings.punycode', 'encodings.cp866', 'encodings.mac_croatian', 'encodings.iso8859_9', 'encodings.cp875', 'encodings.mac_romanian', 'encodings.cp862', 'encodings.cp273', 'encodings.cp861', 'encodings.gb2312', 'encodings.iso8859_2', 'encodings.iso8859_3', 'encodings.cp720', 'encodings.ascii', 'encodings.cp1256', 'encodings.iso8859_15', 'encodings.mac_arabic', 'encodings.cp1250', 'encodings.cp869', 'encodings.iso2022_jp', 'encodings.cp1125', 'encodings.iso2022_jp_3', 'encodings.cp864', 'encodings.iso8859_10', 'encodings.iso8859_4', 'encodings.euc_jis_2004', 'encodings.utf_8_sig', 'encodings.utf_16_le', 'encodings.koi8_t', 'encodings.cp1255', 'encodings.mac_iceland', 'encodings.iso8859_8', 'encodings.cp1253', 'encodings.iso8859_13', 'encodings.cp949', 'encodings.shift_jis_2004', 'encodings.cp1006', 'encodings.cp437', 'encodings.cp1257', 'encodings.iso8859_7', 'encodings.shift_jisx0213', 'encodings.cp1254', 'encodings.hex_codec', 'encodings.cp852', 'encodings.big5hkscs', 'encodings.uu_codec', 'encodings.cp500', 'encodings.hz', 'encodings.iso8859_11', 'encodings.iso2022_jp_2004', 'encodings.koi8_u', 'encodings.cp860', 'encodings.cp775', 'encodings.cp1251', 'encodings.cp857', 'encodings.unicode_escape', 'encodings.cp850', 'encodings.shift_jis', 'encodings.iso8859_5', 'encodings.iso2022_jp_1', 'encodings.undefined', 'encodings.quopri_codec', 'encodings.cp1140', 'encodings.rot_13', 'encodings.euc_jisx0213', 'encodings.cp950', 'encodings.iso2022_jp_2', 'encodings.iso2022_jp_ext', 'encodings.ptcp154', 'encodings.euc_kr', 'encodings.charmap', 'encodings.utf_32', 'encodings.big5', 'encodings.utf_32_le', 'encodings.utf_7', 'encodings.cp865', 'encodings.johab', 'encodings.cp424', 'encodings.utf_16', 'encodings.palmos', 'encodings.kz1048', 'encodings.cp1252', 'encodings.gbk', 'encodings.cp1258', 'encodings.cp855', 'encodings.cp863', 'encodings.hp_roman8', 'encodings.utf_8', 'encodings.utf_16_be', 'encodings.iso8859_16', 'encodings.gb18030', 'encodings'}
INFO PyInstaller.depend.analysis:analysis.py:462 Processing pre-find module path hook distutils from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'.
INFO PyInstaller.utils.hooks:hook-distutils.py:42 distutils: retargeting to non-venv dir '/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9'
INFO PyInstaller.depend.analysis:analysis.py:411 Processing pre-safe import module hook six.moves from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-six.moves.py'.
INFO PyInstaller.depend.analysis:analysis.py:411 Processing pre-safe import module hook setuptools.extern.six.moves from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-setuptools.extern.six.moves.py'.
INFO PyInstaller.depend.analysis:analysis.py:462 Processing pre-find module path hook site from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks/pre_find_module_path/hook-site.py'.
INFO PyInstaller.utils.hooks:hook-site.py:34 site: retargeting to fake-dir '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/fake-modules'
INFO PyInstaller.depend.analysis:analysis.py:809 Caching module dependency graph...
----------------------------------------------------------- Captured stdout call ------------------------------------------------------------
------- Starting build. -------
----------------------------------------------------------- Captured stderr call ------------------------------------------------------------
------- Starting build. -------
------------------------------------------------------------- Captured log call -------------------------------------------------------------
DEBUG PyInstaller.configure:configure.py:27 Testing for UPX ...
INFO PyInstaller.configure:configure.py:58 UPX is not available.
INFO PyInstaller.__main__:__main__.py:103 PyInstaller: 4.1
INFO PyInstaller.__main__:__main__.py:104 Python: 3.9.5
INFO PyInstaller.__main__:__main__.py:106 Platform: macOS-11.4-x86_64-i386-64bit
DEBUG PyInstaller.building.build_main:build_main.py:299 script: /Users/mohamedsayed/dev/pyinstaller/tests/functional/scripts/osx console option.py
INFO PyInstaller.building.build_main:build_main.py:193 Extending PYTHONPATH with paths
['/Users/mohamedsayed/dev/pyinstaller/tests/functional/scripts']
INFO PyInstaller.building.datastruct:datastruct.py:144 checking Analysis
INFO PyInstaller.building.datastruct:datastruct.py:148 Building Analysis because Analysis-00.toc is non existent
INFO PyInstaller.depend.analysis:analysis.py:791 Reusing cached module dependency graph...
INFO PyInstaller.depend.analysis:analysis.py:136 Caching module graph hooks...
DEBUG PyInstaller.depend.utils:utils.py:65 Adding python files to base_library.zip
INFO PyInstaller.building.build_main:build_main.py:360 running Analysis Analysis-00.toc
DEBUG PyInstaller.depend.bindepend:bindepend.py:221 Analyzing /usr/local/bin/../Cellar/python@3.9/3.9.5/bin/../Frameworks/Python.framework/Versions/3.9/bin/python3.9
ERROR PyInstaller.depend.bindepend:bindepend.py:714 Can not find path /usr/lib/libSystem.B.dylib (needed by /usr/local/bin/../Cellar/python@3.9/3.9.5/bin/../Frameworks/Python.framework/Versions/3.9/bin/python3.9)
DEBUG PyInstaller.depend.bindepend:bindepend.py:532 Adding Python dependency of python3.9 from /usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/Python
DEBUG PyInstaller.depend.bindepend:bindepend.py:221 Analyzing /usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/Python
ERROR PyInstaller.depend.bindepend:bindepend.py:714 Can not find path /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (needed by /usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/Python)
ERROR PyInstaller.depend.bindepend:bindepend.py:714 Can not find path /usr/lib/libSystem.B.dylib (needed by /usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/Python)
INFO PyInstaller.building.build_main:build_main.py:412 Analyzing /Users/mohamedsayed/dev/pyinstaller/tests/functional/scripts/osx console option.py
DEBUG PyInstaller.depend.analysis:analysis.py:707 Hidden import 'codecs' already found
INFO PyInstaller.depend.analysis:analysis.py:339 Processing module hooks...
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-pycparser.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-pytest.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-pkg_resources.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
DEBUG PyInstaller.utils.hooks:__init__.py:540 Collecting submodules for pkg_resources._vendor
DEBUG PyInstaller.utils.hooks:__init__.py:612 collect_submodules - Found submodules: {'pkg_resources._vendor.pyparsing', 'pkg_resources._vendor.packaging', 'pkg_resources._vendor.packaging.__about__', 'pkg_resources._vendor.packaging.specifiers', 'pkg_resources._vendor.packaging.tags', 'pkg_resources._vendor.packaging._compat', 'pkg_resources._vendor', 'pkg_resources._vendor.six', 'pkg_resources._vendor.packaging.utils', 'pkg_resources._vendor.packaging.requirements', 'pkg_resources._vendor.packaging.version', 'pkg_resources._vendor.packaging.markers', 'pkg_resources._vendor.packaging._structures', 'pkg_resources._vendor.appdirs'}
DEBUG PyInstaller.utils.hooks:__init__.py:540 Collecting submodules for packaging
DEBUG PyInstaller.utils.hooks:__init__.py:612 collect_submodules - Found submodules: {'packaging.markers', 'packaging.tags', 'packaging._compat', 'packaging.version', 'packaging.requirements', 'packaging.__about__', 'packaging', 'packaging.specifiers', 'packaging._typing', 'packaging.utils', 'packaging._structures'}
INFO PyInstaller.depend.analysis:analysis.py:411 Processing pre-safe import module hook win32com from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/_pyinstaller_hooks_contrib/hooks/pre_safe_import_module/hook-win32com.py'.
WARNING PyInstaller.depend.imphook:imphook.py:516 Hidden import "pkg_resources.py2_warn" not found!
WARNING PyInstaller.depend.imphook:imphook.py:516 Hidden import "pkg_resources.markers" not found!
INFO PyInstaller.depend.imphook:imphook.py:594 Excluding import of __main__ from module pkg_resources
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-scipy.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-xml.etree.cElementTree.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-lib2to3.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
DEBUG PyInstaller.utils.hooks:__init__.py:713 Collecting data files for lib2to3
DEBUG PyInstaller.utils.hooks:__init__.py:781 collect_data_files - Found files: [('/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib2to3/tests/data/README', 'lib2to3/tests/data'), ('/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib2to3/PatternGrammar.txt', 'lib2to3'), ('/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib2to3/Grammar3.9.5.final.0.pickle', 'lib2to3'), ('/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib2to3/PatternGrammar3.9.5.final.0.pickle', 'lib2to3'), ('/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib2to3/Grammar.txt', 'lib2to3')]
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-encodings.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
DEBUG PyInstaller.utils.hooks:__init__.py:540 Collecting submodules for encodings
DEBUG PyInstaller.utils.hooks:__init__.py:612 collect_submodules - Found submodules: {'encodings.mbcs', 'encodings.cp1026', 'encodings.cp037', 'encodings.utf_32_be', 'encodings.mac_greek', 'encodings.raw_unicode_escape', 'encodings.base64_codec', 'encodings.cp874', 'encodings.cp737', 'encodings.mac_roman', 'encodings.iso8859_6', 'encodings.zlib_codec', 'encodings.cp932', 'encodings.cp858', 'encodings.mac_latin2', 'encodings.aliases', 'encodings.koi8_r', 'encodings.iso2022_kr', 'encodings.iso8859_1', 'encodings.latin_1', 'encodings.idna', 'encodings.euc_jp', 'encodings.mac_turkish', 'encodings.cp856', 'encodings.mac_farsi', 'encodings.iso8859_14', 'encodings.tis_620', 'encodings.bz2_codec', 'encodings.mac_cyrillic', 'encodings.oem', 'encodings.punycode', 'encodings.cp866', 'encodings.mac_croatian', 'encodings.iso8859_9', 'encodings.cp875', 'encodings.mac_romanian', 'encodings.cp862', 'encodings.cp273', 'encodings.cp861', 'encodings.gb2312', 'encodings.iso8859_2', 'encodings.iso8859_3', 'encodings.cp720', 'encodings.ascii', 'encodings.cp1256', 'encodings.iso8859_15', 'encodings.mac_arabic', 'encodings.cp1250', 'encodings.cp869', 'encodings.iso2022_jp', 'encodings.cp1125', 'encodings.iso2022_jp_3', 'encodings.cp864', 'encodings.iso8859_10', 'encodings.iso8859_4', 'encodings.euc_jis_2004', 'encodings.utf_8_sig', 'encodings.utf_16_le', 'encodings.koi8_t', 'encodings.cp1255', 'encodings.mac_iceland', 'encodings.iso8859_8', 'encodings.cp1253', 'encodings.iso8859_13', 'encodings.cp949', 'encodings.shift_jis_2004', 'encodings.cp1006', 'encodings.cp437', 'encodings.cp1257', 'encodings.iso8859_7', 'encodings.shift_jisx0213', 'encodings.cp1254', 'encodings.hex_codec', 'encodings.cp852', 'encodings.big5hkscs', 'encodings.uu_codec', 'encodings.cp500', 'encodings.hz', 'encodings.iso8859_11', 'encodings.iso2022_jp_2004', 'encodings.koi8_u', 'encodings.cp860', 'encodings.cp775', 'encodings.cp1251', 'encodings.cp857', 'encodings.unicode_escape', 'encodings.cp850', 'encodings.shift_jis', 'encodings.iso8859_5', 'encodings.iso2022_jp_1', 'encodings.undefined', 'encodings.quopri_codec', 'encodings.cp1140', 'encodings.rot_13', 'encodings.euc_jisx0213', 'encodings.cp950', 'encodings.iso2022_jp_2', 'encodings.iso2022_jp_ext', 'encodings.ptcp154', 'encodings.euc_kr', 'encodings.charmap', 'encodings.utf_32', 'encodings.big5', 'encodings.utf_32_le', 'encodings.utf_7', 'encodings.cp865', 'encodings.johab', 'encodings.cp424', 'encodings.utf_16', 'encodings.palmos', 'encodings.kz1048', 'encodings.cp1252', 'encodings.gbk', 'encodings.cp1258', 'encodings.cp855', 'encodings.cp863', 'encodings.hp_roman8', 'encodings.utf_8', 'encodings.utf_16_be', 'encodings.iso8859_16', 'encodings.gb18030', 'encodings'}
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-distutils.util.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
INFO PyInstaller.depend.imphook:imphook.py:594 Excluding import of lib2to3.refactor from module distutils.util
INFO PyInstaller.depend.imphook:imphook.py:405 Loading module hook 'hook-setuptools.py' from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks'...
DEBUG PyInstaller.utils.hooks:__init__.py:540 Collecting submodules for setuptools._vendor
DEBUG PyInstaller.utils.hooks:__init__.py:612 collect_submodules - Found submodules: {'setuptools._vendor.pyparsing', 'setuptools._vendor.packaging._structures', 'setuptools._vendor.packaging.specifiers', 'setuptools._vendor.ordered_set', 'setuptools._vendor.packaging.requirements', 'setuptools._vendor', 'setuptools._vendor.six', 'setuptools._vendor.packaging.utils', 'setuptools._vendor.packaging.markers', 'setuptools._vendor.packaging.__about__', 'setuptools._vendor.packaging.tags', 'setuptools._vendor.packaging.version', 'setuptools._vendor.packaging', 'setuptools._vendor.packaging._compat'}
INFO PyInstaller.depend.analysis:analysis.py:411 Processing pre-safe import module hook setuptools.extern.six.moves from '/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-setuptools.extern.six.moves.py'.
============================================================= warnings summary ==============================================================
tests/functional/test_basic.py::test_osx_app_console_option
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/nose/config.py:142: DeprecationWarning: invalid escape sequence \.
"""nose configuration.
tests/functional/test_basic.py::test_osx_app_console_option
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/nose/ext/dtcompat.py:686: DeprecationWarning: invalid escape sequence \S
_INDENT_RE = re.compile('^([ ]*)(?=\S)', re.MULTILINE)
tests/functional/test_basic.py::test_osx_app_console_option
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/nose/ext/dtcompat.py:1021: DeprecationWarning: invalid escape sequence \s
pat = re.compile('(^|.*:)\s*\w*("|\')')
tests/functional/test_basic.py::test_osx_app_console_option
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/nose/ext/dtcompat.py:1430: DeprecationWarning: invalid escape sequence \s
want = re.sub('(?m)^%s\s*?$' % re.escape(BLANKLINE_MARKER),
tests/functional/test_basic.py::test_osx_app_console_option
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/nose/ext/dtcompat.py:1434: DeprecationWarning: invalid escape sequence \s
got = re.sub('(?m)^\s*?$', '', got)
tests/functional/test_basic.py::test_osx_app_console_option
/Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================== short test summary info ==========================================================
FAILED tests/functional/test_basic.py::test_osx_app_console_option - ValueError: Target module "setuptools.extern.six.moves.urllib" alread...
============================================== 1 failed, 551 deselected, 6 warnings in 28.41s ===============================================
(py3) ➜ pyinstaller git:(macos-console-bundle) ✗ ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment