Open hhstore opened 1 year ago
requirements.txt
pyproject.toml
pyenv
+ poetry
.pyenv
管理 python 版本. poetry
管理 python 依赖包.
curl -sSf https://rye-up.com/get | bash
Add Shims to Path
, 设置环境变量zsh
:
# zsh:
echo 'source "$HOME/.rye/env"' >> ~/.zshrc
fish
:fish
设置, 查看 env
文件, 手动添加如下:# fish:
# python + rye: $HOME/.rye/shims
set -gx PATH "$PATH:$HOME/.rye/shims"
方法2:
# install
omf install foreign-env
~/.config/fish/config.fish
配置文件:
# fenv + rye: source "$HOME/.rye/env"
if status --is-interactive
fenv source "$HOME/.rye/env"
end
# rye end
rye self update
rye self uninstall
rye init my-project
$ rye pin 3.10
rye add "flask>=2.0"
# dev 包:
rye add --dev black
rye remove flask
sync+run
:
rye add black
rye sync
rye run black
~/.rye/config.toml:
[[sources]]
name = "company-internal"
url = "https://company.internal/simple/"
pyproject.toml
[[tool.rye.sources]]
name = "company-internal"
url = "https://company.internal/simple/"
rye pin cpython@3.11.4
rye toolchain list
rye toolchain fetch cpython@3.8.5
rye toolchain remove cpython@3.8.5
rye init my-project --build-system maturin
cd maturin
maturin
:rye install maturin
rye add --dev pip
rye sync
rye build
rye build --wheel --out target
rye build --clean
rye publish
rye publish dist/example-0.1.0.tar.gz
rye publish --token <your_token> --yes
task: [install:rye] curl -sSf https://rye-up.com/get | bash
This script will automatically download and install rye (latest) for you.
######################################################################## 100.0%
Welcome to Rye!
This installer will install rye to /Users/dev/.rye
This path can be changed by exporting the RYE_HOME environment variable.
Details:
Rye Version: 0.13.0
Platform: macos (aarch64)
Continue? yes
Installed binary to /Users/dev/.rye/shims/rye
Bootstrapping rye internals
Downloading cpython@3.11.5
Checking checksum
success: Downloaded cpython@3.11.5
Upgrading pip
Installing internal dependencies
Updated self-python installation at /Users/dev/.rye/self
The rye directory /Users/dev/.rye/shims was not detected on PATH.
It is highly recommended that you add it.
Add this at the end of your .profile, .zprofile or similar:
source "$HOME/.rye/env"
Note: after adding rye to your path, restart your shell for it to take effect.
For more information read https://mitsuhiko.github.io/rye/guide/installation
All done!
❯ rye --version
rye 0.13.0
commit: 0.13.0 (8e011231e 2023-08-29)
platform: macos (aarch64)
self-python: cpython@3.11
symlink support: true
1
1
📖 Abstract:
💯 Related: