-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from naddeoa/bundle-files
Bundle files
- Loading branch information
Showing
14 changed files
with
69 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sys | ||
import os | ||
from typing import cast | ||
|
||
|
||
def __get_file_content(file_name: str) -> str: | ||
is_binary = getattr(sys, "_MEIPASS", None) | ||
here: str = cast(str, os.path.join(sys._MEIPASS, "booty", "lang") if is_binary else os.path.dirname(__file__)) # type: ignore | ||
with open(os.path.join(here, file_name), "r") as f: | ||
return f.read() | ||
|
||
|
||
def get_stdlib() -> str: | ||
return __get_file_content("stdlib.booty") | ||
|
||
|
||
def get_grammar() -> str: | ||
return __get_file_content("grammar.lark") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
essentials: apt(wget git vim autokey-gtk silversearcher-ag gawk xclip | ||
gnome-disk-utility cryptsetup build-essential dconf-editor ripgrep xdotool | ||
luarocks cmake libterm-readkey-perl expect ssh curl fzf) | ||
luarocks cmake libterm-readkey-perl expect ssh curl fzf software-properties-common) | ||
|
||
files.git -> essentials | ||
files.git: git([email protected]:~/git/files, ~/files) | ||
|
@@ -141,6 +141,7 @@ node: | |
## Racket | ||
## | ||
|
||
racket -> essentials | ||
racket: | ||
setup: | ||
ppa(ppa:plt/racket) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,20 +8,21 @@ keywords = ["bootstrap", "booty", "setup", "cli", "tool"] | |
authors = ["Anthony Naddeo <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
packages = [{ include = "booty/**/*.py" }] | ||
|
||
packages = [ | ||
{ include = "booty/**/*.py"}, | ||
{ include = "booty/**/*.lark"}, | ||
{ include = "booty/**/*.booty"} | ||
] | ||
|
||
[tool.poetry.scripts] | ||
booty = "booty.cli:cli" | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9, <3.13" | ||
lark = "^1.1.8" | ||
click = "^8.1.7" | ||
rich = "^13.7.0" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pyright = "^1.1.338" | ||
ruff = "^0.1.7" | ||
|