## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: pipx Version: 1.1.0 Release: %autorelease Summary: Install and run Python applications in isolated environments License: MIT URL: https://pypa.github.io/pipx Source0: https://github.com/pypa/pipx/archive/%{version}/pipx-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel # noxfile.py: MAN_DEPENDENCIES BuildRequires: python3dist(argparse-manpage) BuildRequires: pkgconfig(bash-completion) %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) BuildRequires: pkgconfig(fish) %global fishcompdir %(pkg-config --variable=completionsdir fish 2>/dev/null) %global fishcomproot %(dirname %{fishcompdir} 2>/dev/null) %description pipx is a tool to help you install and run end-user applications written in Python. It’s roughly similar to macOS’s brew, JavaScript’s npx, and Linux’s apt. It’s closely related to pip. In fact, it uses pip, but is focused on installing and managing Python packages that can be run from the command line directly as applications. %package doc Summary: Documentation for pipx # The Markdown documentation is meant to be build with mkdocs. The HTML result # is unsuitable for packaging due to various bundled and pre-minified # JavaScript and CSS. See https://bugzilla.redhat.com/show_bug.cgi?id=2006555 # for discussion of similar problems with Sphinx and Doxygen. # # We choose to install the Markdown documentation sources, as they are quite # readable without further processing. %description doc Documentation for pipx. %prep %autosetup %generate_buildrequires # We do not run the tests; but we add the runtime requirements as BR’s anyway # so that the build will fail if some are not available in the distribution. %pyproject_buildrequires -w %build %pyproject_wheel # Generate shell completions. “pipx completions” says: # Add the appropriate command to your shell's config file # so that it is run on startup. You will likely have to restart # or re-login for the autocompletion to start working. # # bash: # eval "$(register-python-argcomplete pipx)" # # zsh: # To activate completions for zsh you need to have # bashcompinit enabled in zsh: # # autoload -U bashcompinit # bashcompinit # # Afterwards you can enable completion for pipx: # # eval "$(register-python-argcomplete pipx)" # # tcsh: # eval `register-python-argcomplete --shell tcsh pipx` # # fish: # register-python-argcomplete --shell fish pipx | source for sh in bash tcsh fish do # We don’t need to be able to import pipx for this command to work. register-python-argcomplete --shell "${sh}" pipx > "pipx.${sh}" done # noxfile.py: build_man() PYTHONPATH="${PWD}/src" %{python3} scripts/generate_man.py %install %pyproject_install %pyproject_save_files pipx install -p -m 0644 -D -t '%{buildroot}%{_mandir}/man1' pipx.1 install -p -m 0644 -D -t '%{buildroot}%{bashcompdir}' pipx.bash install -p -m 0644 -D -t '%{buildroot}%{fishcompdir}' pipx.fish # It seems that there is not a reasonable way to install tcsh completions # system-wide, so we just make the completions file available for interested # users. install -p -m 0644 -D pipx.tcsh \ '%{buildroot}%{_datadir}/pipx/pipx-completion.tcsh' # Note that there are no “native” zsh completions, so we do not attempt to # install anything. This could change if an actual zsh user recommends a # different plan. %check # It’s just not practical to run the tests. For most of them, we need either # (by default) a bundle of sample wheels from PyPI–which is arch-specific, as # some of them have compiled extensions—or network access. Previously, we tried # to disentangle the tests that did not require PyPI packages, but this has # become onerous. # # Instead, we “smoke-test” the installation by running the command-line tool # and confirming it can print its help output without crashing. # Make sure the source copy of the package is not in the Python path. mkdir -p empty cd empty PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pipx --help >/dev/null # We separately do an import smoke test, although we must note that the package # does not provide an API designed for external use. %pyproject_check_import %files -f %{pyproject_files} %{_bindir}/pipx %{_mandir}/man1/pipx.1* # Note that it is historically standard in Fedora for packages providing shell # completions to co-own the completions directory in lieu of having a runtime # dependency on the relevant shell completions package. However, the bash # completions directory is now (co-)owned by the filesystem package, so we # don’t have to explicitly handle its ownership. %{bashcompdir}/pipx.bash %{fishcomproot} %{_datadir}/pipx %files doc %license LICENSE %doc CONTRIBUTING.md %doc README.md # Markdown %doc docs %changelog * Sun May 29 2022 Benjamin A. Beasley 1.1.0-1 - Update to 1.1.0 (close RHBZ#2091341) * Fri Jan 21 2022 Fedora Release Engineering 1.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 04 2022 Benjamin A. Beasley 1.0.0-1 - Update to 1.0.0 (close RHBZ#2007950) * Fri Dec 10 2021 Benjamin A. Beasley 0.16.5-7 - Don’t bother setting PYTHONPATH for register-python-argcomplete * Tue Dec 07 2021 Benjamin A. Beasley 0.16.5-6 - Simplify PYTHONPATH for generating completions * Tue Dec 07 2021 Benjamin A. Beasley 0.16.5-5 - Generate completions without a temporary install * Fri Oct 29 2021 Benjamin A. Beasley 0.16.5-4 - Use the new %%%%pyproject_check_import macro * Mon Oct 25 2021 Benjamin A. Beasley 0.16.5-3 - Use %%%%python3 macro instead of %%%%__python3 * Tue Sep 28 2021 Benjamin A. Beasley 0.16.5-2 - Update spec file comment about mkdocs * Sun Sep 26 2021 Benjamin A. Beasley 0.16.5-1 - Update to 0.16.5 (close RHBZ#2007950) * Sun Sep 26 2021 Benjamin A. Beasley 0.16.3-13 - Drop mkdocs support from the spec file completely * Wed Sep 15 2021 Benjamin A. Beasley 0.16.3-12 - Add a “smoke test” since it is impractical to run the upstream tests * Wed Sep 15 2021 Benjamin A. Beasley 0.16.3-11 - Update comment about shell completion directories * Wed Sep 15 2021 Benjamin A. Beasley 0.16.3-10 - Do not patch mkdocs.yml when we are not building documentation * Sun Sep 12 2021 Benjamin A. Beasley 0.16.3-9 - Let pyproject-rpm-macros handle the license file * Sun Sep 12 2021 Benjamin A. Beasley 0.16.3-8 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * Sun Sep 12 2021 Benjamin A. Beasley 0.16.3-7 - Reduce macro indirection in the spec file * Wed Aug 11 2021 Benjamin A. Beasley 0.16.3-6 - Disable using mkdocs since it is orphaned * Tue Jul 27 2021 Benjamin A. Beasley 0.16.3-5 - Move %%generate_buildrequires after %%prep to make the spec file easier to follow * Fri Jul 23 2021 Fedora Release Engineering 0.16.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.16.3-2 - Rebuilt for Python 3.10 * Sat May 29 2021 Benjamin A. Beasley - 0.16.3-1 - New version 0.16.3 - Drop support for running the tests; doing so has become impractical - Re-number source files for downstream man pages * Fri May 28 2021 Benjamin A. Beasley - 0.16.2.1-2 - Build documentation without the mkdocs-material theme - Update URL and Source0 URL, which have moved * Fri Apr 30 2021 Benjamin A. Beasley - 0.16.2.0-1 - New version 0.16.2.1 * Wed Apr 28 2021 Benjamin A. Beasley - 0.16.2.0-1 - New version 0.16.2.0 - Allow running network tests with a build conditional - Add a complete set of man pages * Tue Mar 30 2021 Benjamin A. Beasley - 0.16.1.0-4 - Use pyproject-rpm-macros for build and install, too - Drop Fedora 32/33 workarounds since they lack the dependency versions required for the current version * Thu Mar 25 2021 Benjamin A. Beasley - 0.16.1.0-3 - Improved source URL (better tarball name) * Tue Mar 16 2021 Benjamin A. Beasley - 0.16.1.0-2 - Drop python3dist(setuptools) BR, redundant with %%pyproject_buildrequires * Fri Feb 26 2021 Benjamin A. Beasley - 0.16.1.0-1 - New version 0.16.1.0 * Tue Feb 16 2021 Benjamin A. Beasley - 0.16.0.0-1 - New version 0.16.0.0 * Sun Feb 14 2021 Benjamin A. Beasley - 0.15.6.0-1 - New version 0.15.6.0 - Use GitHub tarball instead of PyPI tarball - License is now only “MIT” instead of “MIT and BSD” - Drop obsolete python_provide macro; do not add py_provides, since the package is only to support the command-line tool and does not provide a public API - Use pyproject-rpm-macros for generated BR’s - Improve description - Run those few tests that do not require network access - Drop sed invocation, as there are no longer stray shebangs - Build HTML documentation and install it in a new -doc subpackage - Package shell completions * Wed Jan 27 2021 Fedora Release Engineering - 0.15.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Oct 5 2020 Martin Jackson - 0.15.5.1-3 - Add explicit dep on setuptools * Sat Aug 29 2020 Martin Jackson - 0.15.5.1-2 - Rebuilding. Dep is OK on f33. * Thu Aug 27 2020 Martin Jackson - 0.15.5.1-1 - Update to upstream release 0.15.5.1 * Tue Jul 28 2020 Fedora Release Engineering - 0.15.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.15.3.1-2 - Rebuilt for Python 3.9 * Mon May 18 2020 Martin Jackson - 0.15.3.1-1 - Update to upstream release 0.15.3.1 * Tue Jan 21 2020 Martin Jackson - 0.15.1.3-1 - Update to upstream release 0.15.1.3 * Sun Jan 12 2020 Martin Jackson - 0.15.1.2-1 - Update to upstream release 0.15.1.2 * Sat Jan 04 2020 Martin Jackson - 0.14.0.0-1 - Convert to pipx name