Skip to content

Commit

Permalink
Bootstrap Python Env (#2)
Browse files Browse the repository at this point in the history
* happy path working for dev mode

* yooooo

* remove dead code

* fix typo

* use command

* some improvements

* cleanupo

* woohoo

* fix style a bit

* logging

* better error handling

* much nicer looking window

* sooo nice

* let's gooo

* update

* force pip install on linux

* bump deps and fix pnpm ignore

* forgot to update some code

* remove node-pty

* fix killing logic

* replace python3.11 => python for windows

* add ensurepath

* return python version from command

* dont reject on error right away

* oops fix

* try use poetry install script

* try powershell

* use py

* write powershell

* humm

* try cmd

* working

Signed-off-by: Joey Yu <[email protected]>

* use pip to install poetry

* try spawn instead

* windows moment

* try execSync

* should be good for win now

* guard send to status bar code

* guard more?

* remove on close for now

* should be good

* bring pipx back

* remove all listeners before quit

Signed-off-by: Joey Yu <[email protected]>

* add pipx bin path to env

* format

* no need to return anything from ensurepath fucntion

* some type fixes

---------

Signed-off-by: Joey Yu <[email protected]>
Co-authored-by: JeffDotPng <[email protected]>
Co-authored-by: docs-update[bot] <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2023
1 parent 1bc4cd3 commit 695e14c
Show file tree
Hide file tree
Showing 49 changed files with 1,768 additions and 1,106 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ module.exports = {
'@electron-toolkit/eslint-config-ts/recommended',
'@electron-toolkit/eslint-config-prettier'
]
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ __pycache__/
*.py[cod]
*$py.class

.DS_Store
2 changes: 1 addition & 1 deletion .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
singleQuote: true
semi: false
semi: true
printWidth: 100
trailingComma: none
plugins:
Expand Down
8 changes: 7 additions & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ directories:
buildResources: build

files:
- 'out/**/*'
- out/**
# make sure to copy everything related to captain
asarUnpack:
- resources/**
extraResources:
- captain/**
- main.py
- pyproject.toml
- poetry.lock

win:
executableName: flojoy-studio
Expand Down
8 changes: 4 additions & 4 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path';
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
main: {
Expand All @@ -20,4 +20,4 @@ export default defineConfig({
},
plugins: [react()]
}
})
});
42 changes: 27 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,55 @@
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
"@tanstack/react-query": "^5.4.3",
"@tanstack/react-query-devtools": "^5.4.3",
"@tanstack/react-router": "0.0.1-beta.198",
"@tanstack/router-devtools": "0.0.1-beta.198",
"axios": "^1.6.0",
"@tanstack/react-query": "^5.8.1",
"@tanstack/react-query-devtools": "^5.8.1",
"axios": "^1.6.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cmdk": "^0.2.0",
"electron-log": "^5.0.0",
"electron-updater": "^6.1.4",
"python-shell": "^5.0.0",
"sonner": "^1.1.0",
"fix-path": "^3.0.0",
"localforage": "^1.10.0",
"lucide-react": "^0.292.0",
"match-sorter": "^6.3.1",
"react-router-dom": "^6.18.0",
"sonner": "^1.2.0",
"sort-by": "^1.2.0",
"tailwind-merge": "^2.0.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.22.4"
"zod": "^3.22.4",
"zustand": "^4.4.6"
},
"devDependencies": {
"@electron-toolkit/eslint-config-prettier": "^1.0.1",
"@electron-toolkit/eslint-config-ts": "^1.0.0",
"@electron-toolkit/tsconfig": "^1.0.1",
"@types/node": "^20.8.10",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react": "^4.1.0",
"@types/node": "^20.9.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.1.1",
"autoprefixer": "^10.4.16",
"concurrently": "^8.2.2",
"electron": "^27.0.2",
"electron": "^27.0.3",
"electron-builder": "^24.6.4",
"electron-vite": "^1.0.28",
"eslint": "^8.52.0",
"eslint": "^8.53.0",
"eslint-plugin-react": "^7.33.2",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.6",
"prettier-plugin-tailwindcss": "^0.5.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.5",
"typescript": "^5.2.2",
"vite": "^4.5.0"
},
"pnpm": {
"updateConfig": {
"ignoreDependencies": [
"fix-path"
]
}
}
}
Loading

0 comments on commit 695e14c

Please sign in to comment.