Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] --jobs options with negative values is not working on nuitka 2.4 #3047

Closed
shenwpo opened this issue Aug 6, 2024 · 3 comments
Closed
Assignees
Milestone

Comments

@shenwpo
Copy link

shenwpo commented Aug 6, 2024

  • python -m nuitka --version
2.4.5
Commercial: None
Python: 3.12.4 (main, Jul 29 2024, 10:35:32) [GCC 11.4.0]
Flavor: Unknown
Executable: /opt/venv/bin/python
OS: Linux
Arch: x86_64
Distribution: Ubuntu (based on Debian) 22.04.4
Version C compiler: /usr/bin/gcc (gcc 11).
  • How did you install Nuitka and Python
 pip install nuitka -U

The following error occurs after executing python3 -m nuitka --job=-2 hello.py

0.525 Nuitka-Options: Used command line options: --jobs=-2  hello.py
0.534 Traceback (most recent call last):
0.534   File "/opt/venv/lib/python3.10/site-packages/nuitka/__main__.py", line 206, in <module>
0.534     main()
0.534   File "/opt/venv/lib/python3.10/site-packages/nuitka/__main__.py", line 151, in main
0.535     Options.commentArgs()
0.535   File "/opt/venv/lib/python3.10/site-packages/nuitka/Options.py", line 1040, in commentArgs
0.535     getJobLimit()
0.535   File "/opt/venv/lib/python3.10/site-packages/nuitka/Options.py", line 1707, in getJobLimit
0.535     result = max(1, getCPUCoreCount()   jobs)
0.535 TypeError: unsupported operand type(s) for  : 'int' and 'str'
@shenwpo
Copy link
Author

shenwpo commented Aug 6, 2024

Maybe we should replace result = max(1, getCPUCoreCount() jobs) with result = max(1, getCPUCoreCount() result).

@kayhayen kayhayen changed the title [BUG] --jobs options is not work on nuitka 2.4 [BUG] --jobs options with negative values is not working on nuitka 2.4 Aug 6, 2024
@kayhayen
Copy link
Member

kayhayen commented Aug 6, 2024

Oh, seems I added that, but never tried it. We intend to use that with CI to not starve Azure processes during compilation, but I didn't get around to it yet.

@kayhayen kayhayen self-assigned this Aug 6, 2024
@kayhayen kayhayen added this to the 2.4 milestone Aug 6, 2024
@kayhayen
Copy link
Member

Released as part of the current hotfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants