Skip to content

chore: remove packaged binary #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,10 @@ pip install gptscript

On MacOS, Windows X6

### SDIST and none-any wheel installations

When installing from the sdist or the none-any wheel, the binary is not packaged by default. You must run the
install_gptscript command to install the binary.

```bash
install_gptscript
```

The script is added to the same bin directory as the python executable, so it should be in your path.

Or you can install the gptscript cli from your code by running:

```python
from gptscript.install import install

install()
```

### Using an existing gptscript cli

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

```bash
export GPTSCRIPT_BIN="/path/to/gptscript"
Expand Down
9 changes: 2 additions & 7 deletions gptscript/gptscript.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import json
import platform
import os
import platform
from socket import socket
from subprocess import Popen, PIPE
from sys import executable
from time import sleep
from typing import Any, Callable, Awaitable

Expand Down Expand Up @@ -145,8 +144,4 @@ def _get_command():
if os.getenv("GPTSCRIPT_BIN") is not None:
return os.getenv("GPTSCRIPT_BIN")

bin_path = os.path.join(os.path.dirname(executable), "gptscript")
if platform.system() == "Windows":
bin_path += ".exe"

return bin_path if os.path.exists(bin_path) else "gptscript"
return "gptscript" + (".exe" if platform.system() == "Windows" else "")
170 changes: 0 additions & 170 deletions gptscript/install.py

This file was deleted.

3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ dependencies = [
"Issues" = "https://github.com/gptscript-ai/py-gptscript/issues"
"Repository" = "https://github.com/gptscript-ai/py-gptscript.git"

[project.scripts]
install_gptscript = "gptscript.install:install"

[tool.wheel]

[tool.setuptools]
Expand Down
Loading