shredEngineer / MagnetiCalc

MagnetiCalc calculates the magnetic field of arbitrary coils.
https://paulwilhelm.de/magneticalc/
Other
45 stars 4 forks source link

Pip version doesn't launch #9

Closed CSChisholm closed 2 years ago

CSChisholm commented 2 years ago

When installed via pip the program doesn't launch on python -m magneticalc with error ModuleNotFoundError: No module named 'magneticalc.QtWidgets2'

I suspect the reason is that the directory is not specified in line 27 of setup.py: package_dir={"magneticalc": "magneticalc"}. Since there are already __init__.py files in the main and sub directories it might be possible to change the file to

from setuptools import setup, find_packages

version = {}
with open("magneticalc/Version.py") as file:
    exec(file.read(), version)

setup(
    packages=find_packages()
    name="MagnetiCalc",
...

But I'm not sure because I don't have much experience making PyPI releases.

shredEngineer commented 2 years ago

Thank you very much for reporting this! Indeed, I forgot to add the subpackages. With find_packages() it seems to work!

Fixed in v1.15.1.