six8 / pyinstaller-alpine

Docker image that can build single file Python apps with PyInstaller for Alpine Linux.
MIT License
80 stars 44 forks source link

make alpine version and repo name optional #3

Closed alirizakeles closed 5 years ago

alirizakeles commented 5 years ago

Thanks for this great job. It saved a lot time. I needed the python:alpine 3.6 with pyinstaller v3.4. I modified Dockerfile manually and it worked for me!. :)

So I added a few simple lines and now you can specify alpine version and repo name while building.

./build.sh v3.4 3.6 repo_name

Thanks again.

Niceies commented 5 years ago

If you use the Python3 , I want to use in Python3 but is doesn't work for me.34 INFO: PyInstaller: 3.2 34 INFO: Python: 3.6.7 37 INFO: Platform: Linux-4.15.0-43-generic-x86_64-with 37 INFO: wrote /snsAgent/test1.spec 39 INFO: UPX is not available. 40 INFO: Extending PYTHONPATH with paths ['/snsAgent', '/snsAgent'] 40 INFO: checking Analysis 40 INFO: Building Analysis because out00-Analysis.toc is non existent 40 INFO: Initializing module dependency graph... 41 INFO: Initializing module graph hooks... 42 INFO: Analyzing base_library.zip ... Traceback (most recent call last): File "/usr/local/bin/pyinstaller", line 11, in <module> sys.exit(run()) File "/usr/local/lib/python3.6/site-packages/PyInstaller/__main__.py", line 90, in run run_build(pyi_config, spec_file, **vars(args)) File "/usr/local/lib/python3.6/site-packages/PyInstaller/__main__.py", line 46, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "/usr/local/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 788, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "/usr/local/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 734, in build exec(text, spec_namespace) File "<string>", line 16, in <module> File "/usr/local/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 212, in __init__ self.__postinit__() File "/usr/local/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 178, in __postinit__ self.assemble() File "/usr/local/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 317, in assemble excludes=self.excludes, user_hook_dirs=self.hookspath) File "/usr/local/lib/python3.6/site-packages/PyInstaller/depend/analysis.py", line 560, in initialize_modgraph graph.import_hook(m) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 906, in import_hook q, tail = self._find_head_package(parent, name, level) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 990, in _find_head_package q = self._safe_import_module(head, qname, parent) File "/usr/local/lib/python3.6/site-packages/PyInstaller/depend/analysis.py", line 209, in _safe_import_module module_basename, module_name, parent_package) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 1211, in _safe_import_module module_name, file_handle, pathname, metadata) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 1243, in _load_module m = self._load_package(fqname, pathname, packagepath) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 1634, in _load_package self._load_module(fqname, fp, buf, stuff) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 1295, in _load_module self._scan_code(m, co, co_ast) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 1460, in _scan_code self._scan_bytecode_stores(co, m) File "/usr/local/lib/python3.6/site-packages/PyInstaller/lib/modulegraph/modulegraph.py", line 1505, in _scan_bytecode_stores name = co.co_names[oparg] IndexError: tuple index out of range can you give me some tips?