mirror of
https://github.com/gwebu-team/profile.d.git
synced 2025-12-10 20:55:46 +00:00
Improve python virtual environment support (uv) take 2.
This commit is contained in:
parent
86034e3f02
commit
8416585ac7
4 changed files with 15 additions and 15 deletions
14
README.md
14
README.md
|
|
@ -3,16 +3,6 @@
|
|||
This is a collection of /etc/profile.d files used by the gwebu team.
|
||||
Unless explicitly stated in the file itself, the license is [The Unlicense](https://choosealicense.com/licenses/unlicense/).
|
||||
|
||||
## Hooks
|
||||
## Automation
|
||||
|
||||
Create the following hook in your local repository to update the RPM changelog for you:
|
||||
|
||||
|
||||
```bash
|
||||
echo '#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
./changelog.sh' > .git/hooks/post-commit
|
||||
chmod a+x .git/hooks/post-commit
|
||||
```
|
||||
To update the RPM changelog run ./changelog.sh
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ sed -i.bak "s/Version: .*/Version: ${rpm_ver}/" gwebu-profile.spec.in
|
|||
sed -i.bak "s/Release: .*/Release: ${rpm_numeric_rev}/" gwebu-profile.spec.in
|
||||
rm -f gwebu-profile.spec.in.bak
|
||||
|
||||
git add gwebu-profile.spec.in
|
||||
# git add gwebu-profile.spec.in
|
||||
|
||||
echo "gwebu-profile.spec.in changelog updated"
|
||||
|
|
|
|||
|
|
@ -81,7 +81,14 @@ function prompt_command() {
|
|||
local prompt="--($my_D, Err ${my_P[*]}, $my_TTY)---($PWD)--"
|
||||
|
||||
if [ -n "${VIRTUAL_ENV:-}" ] && [ -n "$_OLD_VIRTUAL_PS1" ]; then
|
||||
export my_VENV="${VIRTUAL_ENV##*/}"
|
||||
if [ -n "$VIRTUAL_ENV_PROMPT" ]; then
|
||||
my_VENV="${VIRTUAL_ENV_PROMPT%) }"
|
||||
my_VENV="${my_VENV%) }"
|
||||
export my_VENV="${my_VENV#(}"
|
||||
else
|
||||
# Best guess
|
||||
export my_VENV="${VIRTUAL_ENV##*/}"
|
||||
fi
|
||||
prompt="--($my_D, Err ${my_P[*]}, $my_TTY, $my_VENV)---($PWD)--"
|
||||
if [ "${PS1:0:${#my_VENV}+3}" == "($my_VENV) " ]; then
|
||||
# PS1 will be restored by virtual environment's deactivate script.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Summary: Gwebu profile.d - cool date, prompt with history, aliases
|
||||
Name: gwebu-profile
|
||||
Version: 1.0.6
|
||||
Version: 1.0.7
|
||||
Release: 0
|
||||
BuildArch: noarch
|
||||
License: GPLv2
|
||||
|
|
@ -41,6 +41,9 @@ install -m 0644 etc/profile.d/*.sh %{buildroot}%{_sysconfdir}/profile.d/
|
|||
|
||||
|
||||
%changelog
|
||||
* Sun Mar 09 2025 Doncho N. Gunchev <dgunchev@gmail.com> - 1.0.7-0
|
||||
- Improve python virtual environment support (uv) take 2.
|
||||
|
||||
* Sat Feb 15 2025 Doncho Gunchev <doncho.gunchev@flyrlabs.com> - 1.0.6-0
|
||||
- Improve python virtual environment support (uv).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue