indygreg / indygreg/PyOxidizer

ngsolve, module not found

Open
#650 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

Im trying to create app that depends on ngsolve. My targets are both windows and linux.

To test my that i get the depenencies working i have made a simple pyoxidzer.bzl config.
Here a link: https://github.com/GlennWSo/pyoxidzer-learn/blob/ngsolve/pyoxidizer.bzl
Bellow here is a snippet from the file:

def make_exe():
    dist = default_python_distribution(python_version="3.9")
    policy = dist.make_python_packaging_policy()
    policy.set_resource_handling_mode("files")
    policy.resources_location_fallback = "filesystem-relative:lib"

    python_config = dist.make_python_interpreter_config()
    python_config.module_search_paths = ["$ORIGIN/lib"]

    exe = dist.to_python_executable(
        name = "python-with-ngsolve",
        packaging_policy = policy,
        config = python_config,
    )

    for resource in exe.pip_download(["pyvista", "ngsolve"]):
        resource.add_location = "filesystem-relative:lib"
        exe.add_python_resource(resource)

    return exe

What i expect when i enter "pyoxidzer run" is a python shell where i can import ngsolve and pyvista.
but what happens:

foo@bar:~ $ pyoxidizer run
printing lots of info...
...
Python 3.9.13
Type "help" to ...
>>> import pyvista
>>> print(pyvista.__version)
0.36.1
# pyvista package is working :)

>>> import ngsolve
Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'ngsolve'
# :(

Any help would be much appreciated!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked pyoxidizer.bzl configuration and reproduce the failure with pyoxidizer run. Compare how the pyvista and ngsolve resources are packaged and located, then verify that import ngsolve works for the stated Windows and Linux targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.