Skip to content

Commit 36ac2bd

Browse files
committed
add a typed file
1 parent 677e015 commit 36ac2bd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

spynnaker/pyNN/setup_pynn.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
# The version of PyNN that we really want
32-
_TARGET_PYNN_VERSION = "0.9"
32+
_TARGET_PYNN_VERSION = "0.12"
3333

3434

3535
def version_satisfies(module: ModuleType, requirement: str) -> bool:
@@ -58,7 +58,14 @@ def install_spynnaker_into(module: ModuleType) -> None:
5858

5959
pynn_init = os.path.join(spinnaker_dir, "__init__.py")
6060
spynnaker_init = os.path.abspath(sim.__file__)
61+
pynn_dir = os.path.dirname(spynnaker_init)
62+
spynnaker_dir = os.path.dirname(pynn_dir)
6163
shutil.copyfile(spynnaker_init, pynn_init)
64+
65+
py_typed = os.path.join(spynnaker_dir, "py.typed")
66+
pynn_typed = os.path.join(spinnaker_dir, "py_typed")
67+
shutil.copyfile(py_typed, pynn_typed)
68+
6269
print(f"Updated {pynn_init} to be the same as spynnaker.pyNN")
6370

6471

0 commit comments

Comments
 (0)