diff --git a/photon-lib/py/.gitignore b/photon-lib/py/.gitignore index b86077b561..7f777c4abf 100644 --- a/photon-lib/py/.gitignore +++ b/photon-lib/py/.gitignore @@ -7,4 +7,4 @@ photonlibpy/lib/*.so* photonlibpy/lib/*.dylib* photonlibpy/lib/*.dll* photonlibpy/lib/*.pyd -photonlibpy/*.pyi +photonlibpy/lib/*.pyi diff --git a/photon-lib/py/create_photonlib_pyi.py b/photon-lib/py/create_photonlib_pyi.py index 2f8065b123..c060b97f3d 100644 --- a/photon-lib/py/create_photonlib_pyi.py +++ b/photon-lib/py/create_photonlib_pyi.py @@ -13,7 +13,7 @@ def write_stubgen(): sg = StubGen(_pp) sg.put(_pp) script_path = os.path.dirname(os.path.realpath(__file__)) - with open(f"{script_path}/photonlibpy/_photonlibpy.pyi", "w") as f: + with open(f"{script_path}/photonlibpy/lib/_photonlibpy.pyi", "w") as f: f.write(sg.get()) diff --git a/photon-lib/py/setup.py b/photon-lib/py/setup.py index ac7af296ae..e096b5e7a4 100644 --- a/photon-lib/py/setup.py +++ b/photon-lib/py/setup.py @@ -68,11 +68,10 @@ def finalize_options(self): script_path = os.path.dirname(os.path.realpath(__file__)) -if not os.path.exists(f"{script_path}/photonlibpy/_photonlibpy.pyi"): +if not os.path.exists(f"{script_path}/photonlibpy/lib/_photonlibpy.pyi"): print("Generating typehints") try: from create_photonlib_pyi import write_stubgen - write_stubgen() except Exception as e: print(e) diff --git a/test.py b/test.py new file mode 100644 index 0000000000..290ebfaf97 --- /dev/null +++ b/test.py @@ -0,0 +1,3 @@ +import photonlibpy +print(photonlibpy) +print(photonlibpy.PhotonCamera("foobar").GetLatestResult())