--- a/setup.py
+++ b/setup.py
@@ -125,7 +125,7 @@
         s = Path("src/installer.py").read_text()
         s = ver(s.replace("@VERSIONEER-INSTALLER@", v_b64))
         with tempfile.TemporaryDirectory() as tempdir:
-            installer = Path(tempdir) / "versioneer.py"
+            installer = Path(os.getcwd()) / "versioneer.py"
             installer.write_text(s)
 
             self.package_dir.update({'': os.path.relpath(installer.parent)})
