indygreg / indygreg/PyOxidizer
Wrong workflow and issues around MVC type apps (depth of modules and files like dirs or .txt .csv .ini etc. ext) and venv
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
This tool giving promise to game changer around Python and compiling to .exe
I'm coming here after long experience with Nuitka, etc. and wan provide some feedback and suggestion what I meeting and problems..
1. Should be first function to check modules after this adding extra files or compile (now first is compilation) - coz at end.. in .bzl file can be situation as not added file or module, eg. case with MVC.. - I'm not sure that I doing this in right way, but when using my advanced aps as MVC where is eg. OpenGL, etc. PySide6, then each module and especially View, Controller, Model can have other libs, and this tool not care about discovery this.. and each must by added manual (this is what I meet).
- also not sure about add_pypi_package for this libs, in case are for download in this process, etc. in case something in libs (**in venv**) can be used as modified, this is not the right vector I think (regarding point 2) - I found issues around cases when in depth of MVC are dirs or .txt .csv .ini etc. ext used (eg. listing, finding - for PyOxidizer sounds like modules or something)
2. Tool not discovering related modules with MVC as modules called inside Model, View, Controller, eg. Model.MainModels or Model.MainModels.SubModel and more Model.MainModels.SubModel.TypeSubModel (I add this all as packages)
- if in this long pat exist not class type module but not related test.py files, then is disovered : ) ..then each not called in main MVC files as test_2.py test_prototype.py etc. as secured code is taken in to PyOxidizer as something important, but not main MVC : )
3. Exist bad case with temp in `C:\Users\ManPython\AppData\Local\Temp\sdafsadfas` - should be next to project or other path to select in compilation process, it's due memory and page fill and huge project that can do situation as no memoery to continue process
- big misunderstanding with all around type path as `/` or `\` (should be used a solution as `from pathlib import Path, PureWindowsPath`)
5. Right now most of apps when trying compile working in mode: `policy.resources_location = "filesystem-relative:prefix"`, but in mode `policy.resources_location = "in-memory"` not... (look at the log)
```
Compiling main v0.1.0 (C:\Users\ManPython\AppData\Local\Temp\pyoxidizerKdVXFK\main)
Compiling pyo3-macros v0.17.3
Compiling python-oxidized-importer v0.9.0
error: linking with `link.exe` failed: exit code: 0xc0000006
|
= note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\link.exe"
```
..ble ble ble.. as other pathes
and:
```
= note:
main.543l122bhtdpnbb9.rcgu.o : fatal error LNK1000: Internal error during IMAGE::Pass2
note: `link.exe` returned an unexpected error
note: the Visual Studio build tools may need to be repaired using the Visual Studio installer
note: or a necessary component may be missing from the "C++ build tools" workload
error: could not compile `main` due to previous error
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: building executable with Rust project
2: cargo build failed
--> .\pyoxidizer.bzl:43:5
|
43 | files.add_python_resource(".", exe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.to_file_manifest()
error: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: building executable with Rust project
2: cargo build failed
```
- the 43 line is `return files`
[log_2024-05-28.txt](https://github.com/indygreg/PyOxidizer/files/15476315/log_2024-05-28.txt)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading pyoxidizer.bzl around the reported files.add_python_resource call and the linked log, then separate the module discovery, resource paths, temporary-directory, and in-memory resource failures into reproducible cases. Done would require clearly scoped fixes or confirmed diagnoses for those cases, with regression coverage where applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100