diff --git a/pyproject.toml b/pyproject.toml index 347e9ace24..af0541c3e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,5 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] -module = ["matplotlib", "matplotlib.*", "pyNN.*", "quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] +module = ["matplotlib", "matplotlib.*", "pyNN.*","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] ignore_missing_imports = true diff --git a/spynnaker/pyNN/setup_pynn.py b/spynnaker/pyNN/setup_pynn.py index 8d6e09ffc3..38f2f93a42 100644 --- a/spynnaker/pyNN/setup_pynn.py +++ b/spynnaker/pyNN/setup_pynn.py @@ -29,7 +29,7 @@ # The version of PyNN that we really want -_TARGET_PYNN_VERSION = "0.9" +_TARGET_PYNN_VERSION = "0.12" def version_satisfies(module: ModuleType, requirement: str) -> bool: @@ -58,8 +58,16 @@ def install_spynnaker_into(module: ModuleType) -> None: pynn_init = os.path.join(spinnaker_dir, "__init__.py") spynnaker_init = os.path.abspath(sim.__file__) + pynn_dir = os.path.dirname(spynnaker_init) + spynnaker_dir = os.path.dirname(pynn_dir) shutil.copyfile(spynnaker_init, pynn_init) + + py_typed = os.path.join(spynnaker_dir, "py.typed") + pynn_typed = os.path.join(spinnaker_dir, "py.typed") + shutil.copyfile(py_typed, pynn_typed) + print(f"Updated {pynn_init} to be the same as spynnaker.pyNN") + print(f"Added {pynn_typed}") def setup_pynn() -> None: