indygreg / indygreg/PyOxidizer
Filesystem-relative imports do not work from network locations on Windows
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce:
- Create a simple pyoxidizer.bzl config with filesystem-relative imports enabled
def make_exe():
dist = default_python_distribution()
policy = dist.make_python_packaging_policy()
policy.resources_location = "filesystem-relative:lib"
python_config = dist.make_python_interpreter_config()
python_config.module_search_paths = ["$ORIGIN/lib"]
python_config.run_command = "import ctypes; print(ctypes.get_errno())"
exe = dist.to_python_executable(
name="example",
packaging_policy=policy,
config=python_config,
)
return exe
def make_install(exe):
files = FileManifest()
files.add_python_resource("example", exe)
return files
register_target("exe", make_exe)
register_target("install", make_install, depends=["exe"], default=True)
resolve_targets()
- Build using
pyoxidizer buildin a Windows environment - Move the compiled output (including all its extra files) to an SMB share (either mapped or unmapped) and execute it
Expected behavior:
ctypes imports correctly and the program outputs 0
Actual behavior:
Program crashes when importing ctypes:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "ctypes", line 8, in <module>
ImportError: DLL load failed while importing _ctypes: The parameter is incorrect.
Using:
- Pyoxidizer 0.24.0
- Python 3.10.10
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
No source file or test is named. Start by reproducing the provided PyOxidizer 0.24.0 configuration on Windows from both mapped and unmapped SMB locations, then trace the filesystem-relative resource and module-search-path handling; done means ctypes imports successfully and prints 0 from the network location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100