308 Commits

Author SHA1 Message Date
Kay Hayen 4a0c35c4bd Quality: Added clangd checker script
* Include paths need to be absolute, as for clangd they are actually
  file relative otherwise.
2026-05-26 13:30:45 +02:00
Kay Hayen 83f9262e15 Quality: Added checker tool for ruff as well
* This is only a shell script for now, we might add the whole tool
  later if it proves valuable on non-Windows first.
2026-05-26 13:30:45 +02:00
Kay Hayen 71be9379e6 Quality: Added pyright configuration and checker tool
* Main goal is to get Visual Code and LSPs happier.
2026-05-26 13:30:45 +02:00
Kay Hayen 09aa45f220 Cleanup: Remove unused script 2026-05-26 13:30:45 +02:00
Kay Hayen 7bcd580a6d Project: Correct a few mistakes done when changing the license
* Reference the runtime exception everywhere as that is expected
  to be done, not just generally.

* Proper link to the correct version of the license file on the
  web.
2026-05-15 13:27:38 +02:00
Kay Hayen 403434579a fixup! Optimization: Enhanced Python compilation scripts further 2026-05-05 17:58:22 +02:00
Kay Hayen 5fc6298cac Module: Fix, 3.13 and 3.14 backports breaking module mode compatibility across micro versions
* We now generate modified Python headers in case of affected versions,
  which allows us to not use static offsets but instead corrected for
  values.

* The two value sources are for module mode the corrections based on
  runtime vs. compile time version differences. And for MinGW64 we use
  the static offsets, but we store them in JSON files and then generate
  the header code for it.

* Move the Python include directory detection out of Scons into Nuitka
  so we know before compilation what files to modify.

* Added experimental flag for MinGW64 usage with 3.13+ which works via
  collected offset values for internal structures.

* Enhanced the way we handle experimental flags. Previously they were
  not available during environment creation, but we use that now and
  it is much cleaner this way.
2026-04-26 06:52:05 +02:00
Kay Hayen 0b8f2bedeb Cleanup, have shared code for diff generation
* We mean to add another one for generated headers, let that be less verbose code.
2026-04-26 06:52:05 +02:00
Kay Hayen 808acd3490 Optimization: Enhanced Python compilation scripts further
* When actually installing, Windows didn't include the header files.

* Make installing optional for all forms of the scripts.

* Enhanced argument parsing to allow key=value syntax we prefer in Nuitka as well.
2026-04-26 06:52:05 +02:00
Kay Hayen 2eee6cc6ec Optimization: Provide scripts for best compiling Python for Nuitka
* We now have it on Linux, Windows and MacOS.

* These are not yet perfect, but they are a good start, and we can
  improve them over time.

* Move them to bin, given them help and more features to make them
  useable in container files at least.
2026-03-25 10:44:11 +01:00
Kay Hayen 3a58f32540 Quality: Make it not an error if files provided are not to be checked 2026-03-25 10:44:11 +01:00
Kay Hayen 3bc6d24068 Bump copyright year. 2026-03-18 17:28:58 +01:00
Kay Hayen ff14fe2dde Quality: Updated to latest version of black and faster isort
* We were checking the version for private pip space packages
  over and over, which was wasteful, and probably also slowed
  down other things.

* Cache the result of "isort" calls such that on repeated
  execution of autoformat, this relatively slow call is not
  redone unnecessarily.

* Black changed mostly formatting of tripple quoted strings.

* Also noticed that shebang didn't do 3.14 yet.

* A few minor changes to increase readability of formatted string
  interpolations.
2026-03-18 17:23:26 +01:00
Kay Hayen beb7321ee9 Cleanup, use namedtuple for process execution
* This cleans up the way "rusage" was added, by making using code
  independent of order and amount of values.

* This solves a few pylint variable complexity issues as well.

* Also use more return for logger sysexit and format calls nicer.
2026-03-03 14:13:35 +01:00
Kay Hayen 0ac329ec01 Scons: Changed error message for using MinGW64 on newer Python to also mention Zig
* Also enhanced reporting error exit reporting through the scons logger to provide
  the exception in the compilation report.

* More error exits in scons should do this.
2026-01-28 13:44:29 +01:00
Kay Hayen 25d9589c92 Project: Changed license to AGPLv3
* This is with an exception for the runtime library parts
  to allow proprietary compiled code to link against it.

* But it makes creating competitors to Nuitka commercial
  impossible, as they would need to open source their code.
2026-01-28 13:27:34 +01:00
Kay Hayen 718ab60539 Bump copyright year 2025-04-28 11:04:36 +02:00
Kay Hayen d1ec6cc536 Tests: Make sure to default to executing python when comparing results 2024-12-18 11:09:55 +01:00
Kay Hayen 708cd00395 UI: Change runner scripts created
* For Windows use ".CMD" files rather than ".BAT" files,
  these should be more usable.

* Stripe the "3" suffix from Nuitka runner for Python3 versions,
  keep the "2" suffix only for Python2.

* Replaced the "nuitka3" binary in git to "nuitka2", expecting
  the "nuitka" runner to be Python3.
2024-12-18 10:56:01 +01:00
Kay Hayen f34f8d0c63 Bump copyright year
* Also split copyright notices between the top and bottom,
  such that readability of just opened files is not harmed
  by license text.
2024-12-18 10:48:16 +01:00
Kay Hayen d5826a076a macOS: Make it clear this requires Python3 2024-12-18 10:43:40 +01:00
Kay Hayen 80429018b5 Cleanup, prefer "os.getenv" over "os.environ.get"
* More readable and shorter code as a result.
2024-12-18 10:43:40 +01:00
Kay Hayen 1903362296 Minor cleanup 2023-06-09 12:03:38 +02:00
Kay Hayen a2f09ce7d5 Release: Add CI container with podman
* The CI container is based on a variant of Ubuntu that should be suited
  for container usage.

* Start to use it with PyPI, where we will now use a token rather than
  config file for enhanced security.

* Also using it with tests for the linter checks.

* Also adding Debian slim based container, in order to test with that
  e.g. with Python 3.9 and to build the
  Debian packages on it.
2023-06-05 11:39:19 +02:00
Kay Hayen 909d41f02d Bump copyright year 2023-06-02 15:07:22 +02:00
Kay Hayen b45641329b UI: Added option --edit-module-code debug helper
* To avoid manually locating code to open it in Visual Code
  move that find-module helper to main Nuitka, where it is
  more accessible.
2023-06-02 15:07:21 +02:00
Kay Hayen 1ea268d16b Tests: More work on nuitka-watch tool
* This is work in progress still.

* Added command line parsing.

* Moved to tools package for better structure.
2023-04-28 10:29:57 +02:00
Kay Hayen b9de89705a Tests: Adding "nuitka-watch" tool
* This is for running Nuitka-watch test cases

* For PyPI, this is based on pipenv to do the caching for us.

* Currently does not detect if an update makes sense.
2023-04-14 13:28:23 +02:00
Kay Hayen 4580a89e86 Python3.11: Ignore caret ranges in test outputs 2023-01-09 16:42:12 +01:00
Kay Hayen e983f55f0b Quality: For files split with isort ensure newline for second part 2022-09-19 10:52:58 +02:00
Kay Hayen 347e80a55b Cleanups preparing "str.format" handling
* Create the pairs with a dedicated helper function, and do so outside
  of the nodes, but before their creation. In case of caching, that
  process must not be repeated.

* Spelling fixup cause renames in the autoformat and the writing of
  specialized code.

* Prepare "str.format" specialization somewhat, but for the actual
  code generation, we need to become able to defer to call codes
  to handle pairs and arg lists directly, for reuse.

* Moved key-value pairs to separate module, so they do not pollute
  the dictionary code, and added a method for checking them if they
  are constant, to simplify such code that checks for all pairs to
  be constant.

* Use factory functions in more places that previously manually
  generated pair lists with self created key-value pair objects,
  that avoids a lot of code.
2022-05-23 10:28:11 +02:00
Kay Hayen 4cfdd9f9c0 Bump copyright year 2022-05-23 10:28:11 +02:00
Kay Hayen dc7158275c Debugging: Added tool to locate module with Nuitka mechanics
* This will spare me asking the Python prompt
2022-02-19 18:24:30 +01:00
Kay Hayen a61e5da7f5 Quality: Avoid usage of redbaron for pylint comment formatting
* It's very slow and the last thing we did, simply use regexp and ignore
  if it's a comment or not.

* Also, the abort flag was only implemented for redbaron, so remove it,
  we never used it all that well anyway.
2021-12-07 09:40:03 +01:00
Kay Hayen 1d251f2972 Quality: Find clang-format also from newer Clangs
* This is to make it work on newer Ubuntus.
2021-12-07 09:40:01 +01:00
Kay Hayen 8234825039 Quality: Added yamllint checker tool 2021-12-07 09:38:42 +01:00
Kay Hayen 189d396623 Quality: Changes for latest PyLint 2021-12-07 09:37:30 +01:00
Kay Hayen bf7afa98f8 Optimization: Generate special dict attributes automatically
* This should make it a lot easier to add more of the same.

* Also the version specific nature of iteritems is now properly
  considered.

* Cleaned up usage of templates and Jinja2 environments for better
  reuse.
2021-12-07 09:37:29 +01:00
Kay Hayen 47a005ef4a Quality: Make sure to run pylint checker with Python3 only 2021-02-21 21:43:22 +01:00
Kay Hayen e43b72e087 Bump copyright year to 2021. 2021-01-22 09:58:00 +01:00
Kay Hayen 103c893b94 Fix, avoid adding the nuitka package containing directory to sys.path
* This can break things if a standard library name occurs there too,
  this can e.g. be seen with "enum" module breaking Python3 re stdlib.
2021-01-17 15:48:15 +01:00
Kay Hayen 8cc194a01b Quality: Make sure to also checkup "setup.py"
* Also fix for bin runner scripts, we do not check them by default,
  but this one has the problem of binary name and package name as
  being the same, confusing new pylint to a false larm.
2020-12-25 09:17:09 +01:00
Kay Hayen 6d81bdec1d Quality: Make sure to use Python3 for codespell.
* The newest version is found there, fixes more things of course.
2020-12-21 10:57:54 +01:00
Kay Hayen 7c5ab67965 Debugging: Add new binary to execute reference count test
* For this, the user can specifiy a module and have it run
  directly with count tests.
2020-05-01 11:33:23 +02:00
Kay Hayen b2083575cf Bump copyright year to 2020. 2020-02-01 07:42:45 +01:00
Kay Hayen 4c59dd9541 Quality: Add checker tool for codespell correctness.
* This also has a write back option, so it can be used to correct the
  problems found too.
2019-09-01 12:20:47 +02:00
Kay Hayen 5954b42287 Cleanup, specialized code should be more structured.
* Added a binary for executing the specialization.

* Have a dedicated file for "Utils" that is included too, and
  make manual code not live in the general helpers file, that
  was a step back from getting that cleaner.

* Started shifting in-place manual helper code outside of what
  should be generated next.
2019-04-25 22:11:06 +02:00
Kay Hayen fbfc786895 Quality: Make autoformat use a temporary file
* Added support for ignoring a part of the file, e.g. where the
  sys.path is massaged, and still sort imports after that.

* Also some files were not yet formatted.
2019-03-07 07:59:04 +01:00
Kay Hayen 2932ea23de Quality: Enhanced autoformat tool
* So code formatting, pylint comment sorting, import statement sorting
  and line ending cleanups are all now done at once.

* isort and black are hard to make them agree on format for imports, so
  we have to do it one after another.

* This seems to also cleanup a few files not found with manual call.
2019-02-20 19:18:45 +01:00
Kay Hayen 86067d794b Quality: Use black on the runners too. 2019-02-20 19:18:45 +01:00