error: could not create '__init__.cp39-win_amd64.pyd': No such file or directory
Reopening #918
I am trying to compile an entire src/ directory at once. That directory is the root of python code. Running mypyc src/ eventually results in :
[...]
Generating code
Finished generating code
copying build\lib.win-amd64-cpython-39\b2c16f670913ff40c51c__mypyc.cp39-win_amd64.pyd ->
copying build\lib.win-amd64-cpython-39\capture_method\__init__.cp39-win_amd64.pyd -> capture_method
error: could not create 'capture_method\__init__.cp39-win_amd64.pyd': No such file or directory
So instead I try to cd src/ followed by mypyc . --config-file=../mypy.ini which seems to work (compiled w/o errors, although I'm sure I have more runtime issues to go through), but I run into https://github.com/mypyc/mypyc/issues/1008
Source code for reference: https://github.com/Toufool/AutoSplit/tree/mypyc-attempt
I suspect this is still an issue, but not sure. A short self-contained repro would be helpful. We should make this work or at least generate an error and provide some hint about what should be done.
Cloning the branch I shared and running mypyc src/ in the root should serve as a reproduction. I guess you'd need to install type dependencies too. I'll work on providing a minimal reproduction.
The following file structure will result in the error.
.
└── src/
└── package/
├── __init__.py
└── eggs.py
mypyc src/package
The error happens when src does not contain an __init__.py file (though it may contain python files).
mypyc tries to copy the compiled modules of package into package/ (instead of src/package/), which might not exist.
Depending on what files are in package, it may either fail to copy, or copy files to . when they should be placed in src