forked from pool/pyenv
Dirk Mueller
72a9e33e01
- Update to 2.3.7 - Add Python version 3.11 to the macOS build by @jbkkd in #2510 - Don't use Zlib from XCode SDK if a custom compiler is used by @native-api in #2516 - Change line endings from CRLF to LF by @hoang-himself in #2517 - Fix resolution of a name that's a prefix of another name by @native-api in #2521 - GitHub Workflows security hardening by @sashashura in #2511 - Add nushell to activate list by @theref in #2524 - Fix compilation error when building OpenSSL 1.1.1q in MacOS 11+ for 3.9.15 and 3.8.15 by @twangboy in #2520 - Add simple .editorconfig file by @aphedges in #2518 - Support aria2c being a snap by @native-api in #2528 - Add CPython 3.12.0a2 by @saaketp in #2527 - Add --no-push-path option by @isaacl in #2526 - Fix typo in README.md by @weensy in #2535 - Copy auto installer oneliner to readme by @spookyuser in #2538 Full Changelog: https://github.com/pyenv/pyenv/compare/v2.3.6...v2.3.7 OBS-URL: https://build.opensuse.org/request/show/1039855 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/pyenv?expand=0&rev=43
150 lines
4.3 KiB
RPMSpec
150 lines
4.3 KiB
RPMSpec
#
|
|
# spec file for package pyenv
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define pyenv_dir %{_libexecdir}/pyenv
|
|
#
|
|
Name: pyenv
|
|
Version: 2.3.7
|
|
Release: 0
|
|
Summary: Python Version Management
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/pyenv/pyenv
|
|
Source: https://github.com/pyenv/pyenv/archive/refs/tags/v%{version}.tar.gz#/pyenv-%{version}.tar.gz
|
|
#
|
|
BuildRequires: bash-completion
|
|
BuildRequires: fdupes
|
|
BuildRequires: fish
|
|
BuildRequires: gcc
|
|
BuildRequires: make
|
|
BuildRequires: zsh
|
|
|
|
%description
|
|
pyenv lets the user switch between multiple versions of Python.
|
|
|
|
This project was forked from rbenv and ruby-build, and modified for Python.
|
|
|
|
%package bash-completion
|
|
Summary: Bash completion for %{name}
|
|
Group: System/Shells
|
|
Requires: %{name} = %{version}
|
|
Supplements: (pyenv and bash-completion)
|
|
BuildArch: noarch
|
|
|
|
%description bash-completion
|
|
Bash command line completion support for %{name}.
|
|
|
|
%package fish-completion
|
|
Summary: Fish completion for %{name}
|
|
Group: System/Shells
|
|
Requires: %{name} = %{version}
|
|
Supplements: (pyenv and fish)
|
|
BuildArch: noarch
|
|
|
|
%description fish-completion
|
|
Fish command line completion support for %{name}.
|
|
|
|
%package zsh-completion
|
|
Summary: Zsh completion for %{name}
|
|
Group: System/Shells
|
|
Requires: %{name} = %{version}
|
|
Supplements: (pyenv and zsh)
|
|
BuildArch: noarch
|
|
|
|
%description zsh-completion
|
|
Zsh command line completion support for %{name}.
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{name}-%{version}
|
|
|
|
sed -i -e '1s,^#!%{_bindir}/env bash,#!/bin/bash,' libexec/* pyenv.d/exec/pip-rehash/* plugins/python-build/bin/*
|
|
|
|
%build
|
|
##
|
|
pushd src
|
|
%configure
|
|
%make_build
|
|
popd
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{pyenv_dir} \
|
|
%{buildroot}%{pyenv_dir}/plugins \
|
|
%{buildroot}%{pyenv_dir}/shims/ \
|
|
%{buildroot}%{pyenv_dir}/share/python-build/ \
|
|
%{buildroot}%{_sysconfdir}/pyenv.d/ \
|
|
%{buildroot}%{_bindir}
|
|
|
|
cp -R libexec %{buildroot}%{pyenv_dir}
|
|
cp -R bin %{buildroot}%{pyenv_dir}
|
|
cp -a pyenv.d %{buildroot}%{_sysconfdir}/
|
|
|
|
## Install shell completions:
|
|
install -D -m0644 completions/pyenv.bash %{buildroot}%{_datadir}/bash-completion/completions/pyenv
|
|
install -D -m0644 completions/pyenv.zsh %{buildroot}%{_sysconfdir}/zsh_completion.d/pyenv
|
|
install -D -m0644 completions/pyenv.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/pyenv.fish
|
|
|
|
## Install manpage
|
|
install -D -m0644 man/man1/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
|
pushd %{buildroot}%{_mandir}/man1/
|
|
ln -s %{name}.1 python-build.1
|
|
popd
|
|
|
|
ln -s %{pyenv_dir}/bin/pyenv %{buildroot}%{_bindir}/pyenv
|
|
|
|
## python-build
|
|
pushd plugins/python-build
|
|
install -m755 bin/* %{buildroot}%{pyenv_dir}/libexec
|
|
cp -a share/python-build %{buildroot}%{pyenv_dir}/share/
|
|
popd
|
|
|
|
%fdupes %{buildroot}%{pyenv_dir}
|
|
|
|
%files
|
|
%doc CHANGELOG.md COMMANDS.md README.md
|
|
%license LICENSE
|
|
%exclude %{_sysconfdir}/pyenv.d/rehash/*/.gitignore
|
|
|
|
%config %{_sysconfdir}/pyenv.d/rehash/*.d/default.list
|
|
%config %{_sysconfdir}/pyenv.d/exec/pip-rehash.bash
|
|
%config %{_sysconfdir}/pyenv.d/rehash/*.bash
|
|
%config %{_sysconfdir}/pyenv.d/install/*.bash
|
|
|
|
%{pyenv_dir}
|
|
%dir %{_sysconfdir}/pyenv.d
|
|
%dir %{_sysconfdir}/pyenv.d/exec/
|
|
%dir %{_sysconfdir}/pyenv.d/rehash/
|
|
%dir %{_sysconfdir}/pyenv.d/rehash/*.d/
|
|
%dir %{_sysconfdir}/pyenv.d/install/
|
|
|
|
%{_sysconfdir}/pyenv.d/exec/pip-rehash
|
|
%{_bindir}/pyenv
|
|
#
|
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
|
%{_mandir}/man1/python-build.1%{?ext_man}
|
|
|
|
%files bash-completion
|
|
%{_datadir}/bash-completion/completions/pyenv
|
|
|
|
%files fish-completion
|
|
%{_datadir}/fish/vendor_completions.d/pyenv.fish
|
|
|
|
%files zsh-completion
|
|
%config %{_sysconfdir}/zsh_completion.d/pyenv
|
|
|
|
%changelog
|