Skip to content

Commit f7e0a91

Browse files
committed
chore: remove packaged binary
Signed-off-by: Donnie Adams <[email protected]>
1 parent 65fe72c commit f7e0a91

File tree

7 files changed

+8
-341
lines changed

7 files changed

+8
-341
lines changed

README.md

+2-20
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,10 @@ pip install gptscript
1515

1616
On MacOS, Windows X6
1717

18-
### SDIST and none-any wheel installations
19-
20-
When installing from the sdist or the none-any wheel, the binary is not packaged by default. You must run the
21-
install_gptscript command to install the binary.
22-
23-
```bash
24-
install_gptscript
25-
```
26-
27-
The script is added to the same bin directory as the python executable, so it should be in your path.
28-
29-
Or you can install the gptscript cli from your code by running:
30-
31-
```python
32-
from gptscript.install import install
33-
34-
install()
35-
```
36-
3718
### Using an existing gptscript cli
3819

39-
If you already have the gptscript cli installed, you can use it by setting the envvar:
20+
If you already have the gptscript cli installed, then, by default, `py-gptscript` will use it if it is on your `PATH`.
21+
Otherwise, you can use it by setting the envvar:
4022

4123
```bash
4224
export GPTSCRIPT_BIN="/path/to/gptscript"

gptscript/gptscript.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import json
2-
import platform
32
import os
3+
import platform
44
from socket import socket
55
from subprocess import Popen, PIPE
6-
from sys import executable
76
from time import sleep
87
from typing import Any, Callable, Awaitable
98

@@ -145,8 +144,4 @@ def _get_command():
145144
if os.getenv("GPTSCRIPT_BIN") is not None:
146145
return os.getenv("GPTSCRIPT_BIN")
147146

148-
bin_path = os.path.join(os.path.dirname(executable), "gptscript")
149-
if platform.system() == "Windows":
150-
bin_path += ".exe"
151-
152-
return bin_path if os.path.exists(bin_path) else "gptscript"
147+
return "gptscript" + (".exe" if platform.system() == "Windows" else "")

gptscript/install.py

-170
This file was deleted.

pyproject.toml

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ dependencies = [
2525
"Issues" = "https://github.com/gptscript-ai/py-gptscript/issues"
2626
"Repository" = "https://github.com/gptscript-ai/py-gptscript.git"
2727

28-
[project.scripts]
29-
install_gptscript = "gptscript.install:install"
30-
3128
[tool.wheel]
3229

3330
[tool.setuptools]

0 commit comments

Comments
 (0)