public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-nodeenv] f43: Update to 1.12.0 (close RHBZ#2563723)
@ 2026-11-03 13:22 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-11-03 13:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-nodeenv
Branch : f43
Commit : 05e71817e31006f9ac56e0f09dba186a84203365
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-11-01T10:04:54+00:00
Stats : +57/-11 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-nodeenv/c/05e71817e31006f9ac56e0f09dba186a84203365?branch=f43
Log:
Update to 1.12.0 (close RHBZ#2563723)
- Add support for installing shell completions, waiting for shtab≥1.11
Since this release requires Python 3.10 and EPEL9 has Python 3.9, no
longer accommodate EPEL9 limitations in the spec file.
---
diff --git a/.gitignore b/.gitignore
index 8ba5c05..2f67142 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/nodeenv-1.10.0.tar.gz
/nodeenv-1.11.0.tar.gz
/nodeenv-1.11.1.tar.gz
+/nodeenv-1.12.0.tar.gz
diff --git a/python-nodeenv.spec b/python-nodeenv.spec
index 22f5fa4..9dc3a5f 100644
--- a/python-nodeenv.spec
+++ b/python-nodeenv.spec
@@ -1,5 +1,10 @@
+# Generating shell completions requires shtab 1.11.0 or later,
+# https://bugzilla.redhat.com/show_bug.cgi?id=2415592,
+# https://src.fedoraproject.org/rpms/python-shtab/pull-request/2
+%bcond completion 0
+
Name: python-nodeenv
-Version: 1.11.1
+Version: 1.12.0
Release: %autorelease
Summary: Node.js virtual environment builder
@@ -41,21 +46,29 @@ Summary: %{summary}
%description -n python3-nodeenv %{_description}
-%pyproject_extras_subpkg -n python3-nodeenv certifi
+%pyproject_extras_subpkg --name python3-nodeenv certifi
+%if %{with completion}
+%pyproject_extras_subpkg --name python3-nodeenv completion
+%endif
%prep
%autosetup -n nodeenv-%{version} -p1
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
-sed -r -i "s@'coverage', 'run', '-p',@'%{python3}',@" tests/nodeenv_test.py
+sed --regexp-extended --in-place \
+ "s@'coverage', 'run', '-p',@'%{python3}',@" tests/nodeenv_test.py
# Remove unwanted shebangs from files that will not have the executable bit set
-sed -r -i '1{/^#!/d}' nodeenv.py
+sed --regexp-extended --in-place '1{/^#!/d}' nodeenv.py
+
+# Upstream wants shtab >=1.11, but we can get by with older releases
+# https://bugzilla.redhat.com/show_bug.cgi?id=2415592
+sed --regexp-extended --in-place "s/(shtab)>=[^'\"]+/\\1/" setup.py
%generate_buildrequires
-%pyproject_buildrequires -x certifi
+%pyproject_buildrequires --extras certifi%{?with_completion:,completion}
%build
@@ -64,21 +77,48 @@ sed -r -i '1{/^#!/d}' nodeenv.py
%install
%pyproject_install
-%pyproject_save_files -l nodeenv
+%pyproject_save_files --assert-license nodeenv
+
+# Set up the environment to generate the man page and completions using the
+# installed entry point. See %%{py3_test_envvars} on EPEL10+ and Fedora.
+export PYTHONPATH='%{buildroot}%{python3_sitelib}'
+export PYTHONDONTWRITEBYTECODE=1
# Generate the man page here, rather than in %%build, so that the executable
# script entry point is readily available.
-install -d '%{buildroot}%{_mandir}/man1'
-PYTHONPATH='%{buildroot}%{python3_sitelib}' \
- help2man --no-info --output='%{buildroot}%{_mandir}/man1/nodeenv.1' \
+install --directory '%{buildroot}%{_mandir}/man1'
+help2man --no-info --output='%{buildroot}%{_mandir}/man1/nodeenv.1' \
'%{buildroot}%{_bindir}/nodeenv'
+%if %{with completions}
+# From the message for
+# https://github.com/ekalinin/nodeenv/commit/0fd263f58fd232b6b6a8e8def2401db885eb3d7d,
+#
+# --print-completion SHELL prints a completion script for bash, zsh, fish or
+# PowerShell, made by shtab from the same parser that reads the command line.
+# shtab is an optional dependency, installed with the completion extra, and
+# only this flag imports it: without shtab the flag stays in --help and exits
+# with the pip command to run.
+#
+# Pre-generate and install the completion files.
+while read -r shell target
+do
+ install --directory "%{buildroot}$(dirname "${target}")"
+ '%{buildroot}%{_bindir}/nodeenv' --print-completion "${shell}" \
+ > "%{buildroot}${target}"
+done <<'EOF'
+bash %{bash_completions_dir}/nodeenv
+zsh %{zsh_completions_dir}/_nodeenv
+fish %{fish_completions_dir}/nodeenv.fish
+EOF
+%endif
+
%check
# Requires network access:
k="${k-}${k+ and }not test_smoke"
-%pytest -k "${k-}" -v
+%pytest -k "${k-}" --verbose
%files -n python3-nodeenv -f %{pyproject_files}
@@ -88,6 +128,11 @@ k="${k-}${k+ and }not test_smoke"
%{_bindir}/nodeenv
%{_mandir}/man1/nodeenv.1*
+%if %{with completions}
+%{bash_completions_dir}/nodeenv
+%{zsh_completions_dir}/_nodeenv
+%{fish_completions_dir}/nodeenv.fish
+%endif
%changelog
diff --git a/sources b/sources
index 9a9f690..31caead 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (nodeenv-1.11.1.tar.gz) = ac0dc6a8ce12e5422392e777b6dde03c4c254cccd55d862e53c5467a4b1830ef31c0af8a71915923f288b6d363b48e2f12f92c29d443fcd183e4da38fde45e90
+SHA512 (nodeenv-1.12.0.tar.gz) = 965fe7110e1241ce10f0a3eb63c57177caf0504758e0bfa538cca5c0d4d06954db43154f866aa73710161004de476af019e38ac9355dc16b7c094c70495d21d2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 13:22 [rpms/python-nodeenv] f43: Update to 1.12.0 (close RHBZ#2563723) Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox