JackMcKew / pyinstaller-action-windows

Github Action for building executables with Pyinstaller
MIT License
168 stars 67 forks source link

OSError: [WinError 123] Invalid name: '/tmp\\*' #3

Closed Zenahr closed 3 years ago

Zenahr commented 3 years ago

I have the following folder structure in my project:

.github -> workflows -> dev_build.yaml
src -> my_app.py

And my YAML settings are as follows:

name: Package Application with Pyinstaller

on: push

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Package Application
      uses: JackMcKew/pyinstaller-action-windows@main
      with:
        path: ./src
        # spec: null

    - uses: actions/upload-artifact@v2
      with:
        name:  gaete_dev
        path: src/dist/windows

What am I missing here? I also tried with path: src but that didn't help. does it have to be something like ../../src ?

trace:

Run JackMcKew/pyinstaller-action-windows@main
/usr/bin/docker run --name aac2aa71395ef7f19a4e25924ae99619cf3c07_6ea493 --label aac2aa --workdir /github/workspace --rm -e INPUT_PATH -e INPUT_PYPI_URL -e INPUT_PYPI_INDEX_URL -e INPUT_SPEC -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/gae-traffic-reporting/gae-traffic-reporting":"/github/workspace" aac2aa:71395ef7f19a4e25924ae99619cf3c07  "../../src" "https://pypi.python.org/" "https://pypi.python.org/simple" ""
Collecting pip
  Downloading https://files.pythonhosted.org/packages/4e/5f/528232275f6509b1fff703c9280e58951a81abe24640905de621c9f81839/pip-20.2.3-py2.py3-none-any.whl (1.5MB)
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/44/a6/7fb6e8b3f4a6051e72e4e2218889351f0ee484b9ee17e995f5ccff780300/setuptools-50.3.0-py3-none-any.whl (785kB)
Installing collected packages: pip, wheel, setuptools
  Found existing installation: pip 19.3.1
    Uninstalling pip-19.3.1:
      Successfully uninstalled pip-19.3.1
  Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
      Successfully uninstalled setuptools-41.2.0
Successfully installed pip-20.2.3 setuptools-50.3.0 wheel-0.35.1
165 INFO: PyInstaller: 3.6
165 INFO: Python: 3.7.5
166 INFO: Platform: Windows-7-6.1.7601-SP1
175 INFO: UPX is not available.
176 INFO: Removing temporary files and cleaning cache in C:\users\root\Application Data\pyinstaller
Traceback (most recent call last):
  File "c:\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 636, in build
    os.makedirs(pth)
  File "c:\Python37\lib\os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [WinError 123] Invalid name: '/tmp\\*'
JackMcKew commented 3 years ago

Could you please link the repo you're using it on if possible?

From my understanding, using 'src' on it's own as the path argument should do what you're trying to do

Is it possible you don't have a spec file in the src folder for pyinstaller to use?

This repo might be of use to see if there's any disparity https://github.com/JackMcKew/pyinstaller-action-windows-example

Zenahr commented 3 years ago

@JackMcKew Thank you for your apt reply! Yeah I haven't added a requirements.txt nor a .spec file to my src folder. That might be it! I'll close this for now and reopen the issue if need be. Thanks for providing the template.

JackMcKew commented 3 years ago

No problem, I suspect that was the issue but please let me know if it doesn't fix it because then we'll have bigger problems haha

Zenahr commented 3 years ago

@JackMcKew it works perfectly fine! Thank you for your time.

sjanibekova commented 3 years ago

I have the same issue , How did you resolve it? could you help me please @Zenahr

JackMcKew commented 3 years ago

@sjanibekova I'd suggest looking into whether you have a requirements.txt and a .spec file in your src folder with your repo, take a look at the example repository above for how that's laid out and try to follow it. 😄

Zenahr commented 3 years ago

@sjanibekova I don't have access to the code-base anymore but if I remember correctly it was as simple as adding the .spec file to the YAML config file as described by Jack.