mirror of
https://github.com/gwebu-team/profile.d.git
synced 2025-12-11 12:15:47 +00:00
Improve python virtual environment support (uv) take 2.
Some checks failed
Makefile CI / build (push) Has been cancelled
Some checks failed
Makefile CI / build (push) Has been cancelled
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.
|
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/).
|
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:
|
To update the RPM changelog run ./changelog.sh
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo '#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
./changelog.sh' > .git/hooks/post-commit
|
|
||||||
chmod a+x .git/hooks/post-commit
|
|
||||||
```
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
sed -i.bak "s/Release: .*/Release: ${rpm_numeric_rev}/" gwebu-profile.spec.in
|
||||||
rm -f gwebu-profile.spec.in.bak
|
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"
|
echo "gwebu-profile.spec.in changelog updated"
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,14 @@ function prompt_command() {
|
||||||
local prompt="--($my_D, Err ${my_P[*]}, $my_TTY)---($PWD)--"
|
local prompt="--($my_D, Err ${my_P[*]}, $my_TTY)---($PWD)--"
|
||||||
|
|
||||||
if [ -n "${VIRTUAL_ENV:-}" ] && [ -n "$_OLD_VIRTUAL_PS1" ]; then
|
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)--"
|
prompt="--($my_D, Err ${my_P[*]}, $my_TTY, $my_VENV)---($PWD)--"
|
||||||
if [ "${PS1:0:${#my_VENV}+3}" == "($my_VENV) " ]; then
|
if [ "${PS1:0:${#my_VENV}+3}" == "($my_VENV) " ]; then
|
||||||
# PS1 will be restored by virtual environment's deactivate script.
|
# PS1 will be restored by virtual environment's deactivate script.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
Summary: Gwebu profile.d - cool date, prompt with history, aliases
|
Summary: Gwebu profile.d - cool date, prompt with history, aliases
|
||||||
Name: gwebu-profile
|
Name: gwebu-profile
|
||||||
Version: 1.0.6
|
Version: 1.0.7
|
||||||
Release: 0
|
Release: 0
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
|
|
@ -41,6 +41,9 @@ install -m 0644 etc/profile.d/*.sh %{buildroot}%{_sysconfdir}/profile.d/
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Sat Feb 15 2025 Doncho Gunchev <doncho.gunchev@flyrlabs.com> - 1.0.6-0
|
||||||
- Improve python virtual environment support (uv).
|
- Improve python virtual environment support (uv).
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue