Skip to content

Commit

Permalink
fix!(distrib): Do not expose bun CLI to the end user
Browse files Browse the repository at this point in the history
We silently expose a CLI to the bun executable on the user's PATH
which could mess with its own existing bun setup.

Instead, pybun now only exposes a CLI to the bun executable via `pybun`,
`python -m pybun`, or a programmatic access.

---

Fix #2
  • Loading branch information
ducdetronquito committed Oct 7, 2024
1 parent 9296905 commit 53a9711
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@


[Bun](https://bun.sh/) is an all-in-one toolkit for JavaScript and TypeScript apps.
The [pybun](https://pypi.org/project/pybun/) Python package redistributes the Bun CLI executable so that it can be used as a dependency in your Python projects.
The [pybun](https://pypi.org/project/pybun/) Python package redistributes the Bun executable so that it can be used as a dependency in your Python projects.


Usage
-----

To run the Bun CLI from the command line, you can use:
### Command line

```shell
pybun --version
bun --version
```

### Run library module as a script

```shell
python -m pybun --version
```

To run the Bun CLI from a Python program, use `sys.executable` to locate the Python binary to invoke. For example:
### From python

```python
import sys, subprocess
Expand Down
1 change: 0 additions & 1 deletion assets/entry_points.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[console_scripts]
bun = pybun.__main__:main
pybun = pybun.__main__:main

0 comments on commit 53a9711

Please sign in to comment.