Skip to content

Commit 3510dfd

Browse files
committed
Added specfile.
Submitted Package review request on fedora, redhat bugzilla. Published on Copr.
1 parent 96ae7b5 commit 3510dfd

File tree

8 files changed

+64
-6
lines changed

8 files changed

+64
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ include = [
5151
"src/envon/**",
5252
"README.md",
5353
"LICENSE",
54+
"docs/**",
5455
]

python3-envon.spec

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
%global srcname envon
2+
3+
Name: python3-%{srcname}
4+
Version: 0.1.1
5+
Release: 1%{?dist}
6+
Summary: Emit the activation command for the nearest Python virtual environment
7+
8+
License: MIT
9+
URL: https://github.com/userfrom1995/%{srcname}
10+
Source0: https://github.com/userfrom1995/%{srcname}/archive/refs/tags/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
11+
12+
BuildArch: noarch
13+
BuildRequires: python3-devel
14+
BuildRequires: python3-setuptools
15+
BuildRequires: python3-build
16+
BuildRequires: python3-hatchling
17+
BuildRequires: python3-installer
18+
19+
Requires: python3-virtualenv >= 20
20+
21+
%description
22+
envon is a cross-shell Python virtual environment activator that emits the correct
23+
activation command for your shell. It auto-detects the nearest or specified virtual
24+
environment and supports bash, zsh, sh, fish, powershell, pwsh, nushell, cmd, and
25+
csh/tcsh/cshell.
26+
27+
%prep
28+
%autosetup -n %{srcname}-%{version}
29+
30+
%build
31+
python3 -m build --wheel --no-isolation
32+
33+
%install
34+
python3 -m installer --destdir=%{buildroot} dist/*.whl
35+
36+
# Create directories for shell bootstrap files
37+
mkdir -p %{buildroot}%{_datadir}/%{srcname}
38+
39+
# Install bootstrap files
40+
cp -r src/%{srcname}/bootstrap_*.sh %{buildroot}%{_datadir}/%{srcname}/
41+
cp -r src/%{srcname}/bootstrap_*.fish %{buildroot}%{_datadir}/%{srcname}/
42+
cp -r src/%{srcname}/bootstrap_*.ps1 %{buildroot}%{_datadir}/%{srcname}/
43+
cp -r src/%{srcname}/bootstrap_*.csh %{buildroot}%{_datadir}/%{srcname}/
44+
cp -r src/%{srcname}/bootstrap_*.nu %{buildroot}%{_datadir}/%{srcname}/
45+
46+
%files
47+
%license LICENSE
48+
%doc README.md docs/
49+
%{python3_sitelib}/%{srcname}-%{version}.dist-info/
50+
%{python3_sitelib}/%{srcname}/
51+
%{_bindir}/%{srcname}
52+
%{_datadir}/%{srcname}/
53+
54+
%changelog
55+
* Tue Nov 18 2025 User1995 <[email protected]> - 0.1.1-1
56+
- Initial package</content>
57+
<parameter name="filePath">\\wsl.localhost\Ubuntu\home\base\envon\python-envon.spec

src/envon/bootstrap_bash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
envon() {
1+
envon() {
22
if [ "$#" -gt 0 ]; then
33
case "$1" in
44
help|-h|--help|--install) command envon "$@"; return $? ;;

src/envon/bootstrap_csh.csh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!usr/bin/tcsh -f
1+
#!usr/bin/tcsh -f
22
#! /bin/tcsh -f
33
# envon wrapper script for tcsh compatibility
44

src/envon/bootstrap_fish.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function envon
1+
function envon
22
if test (count $argv) -gt 0
33
set first $argv[1]
44
if test "$first" = "--"

src/envon/bootstrap_nushell.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
def --env envon [...args] {
1+
def --env envon [...args] {
22
if ($args | is-empty) == false {
33
let first = ($args | first)
44
if $first == '--' { let args = ($args | skip 1); ^envon ...$args; return }

src/envon/bootstrap_powershell.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function envon {
1+
function envon {
22
param([Parameter(ValueFromRemainingArguments=$true)][string[]]$Args)
33
$envonExe = Get-Command envon -CommandType Application -ErrorAction SilentlyContinue
44
if (-not $envonExe) { Write-Error 'envon console script not found on PATH'; return }

src/envon/bootstrap_sh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
envon() {
1+
envon() {
22
if [ "$#" -gt 0 ]; then
33
case "$1" in
44
help|-h|--help|--install) command envon "$@"; return $? ;;

0 commit comments

Comments
 (0)