## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 20 %bcond_without check %global crate python-launcher Name: rust-%{crate} Version: 1.0.0 Release: %autorelease Summary: Python launcher for Unix # Upstream license specification: MIT License: MIT URL: https://crates.io/crates/python-launcher Source: %{crates_source} # Initial patched metadata # * drop criterion dev-dependency (only used in benchmarks) # * exclude some files that are only useful for upstream: # https://github.com/brettcannon/python-launcher/pull/147 # * Bump assert_cmd to 2.0.0 Patch0: python-launcher-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging %global _description %{expand: The Python Launcher for Unix. Launch your Python interpreter the lazy/smart way! This launcher is an implementation of the py command for Unix-based platforms. The goal is to have py become the cross-platform command that Python users typically use to launch an interpreter while doing development. By having a command that is version-agnostic when it comes to Python, it side-steps the "what should the python command point to?" debate by clearly specifying that upfront (i.e. the newest version of Python that can be found). This also unifies the suggested command to document for launching Python on both Windows as Unix as py has existed as the preferred command on Windows since 2012 with the release of Python 3.3. Typical usage would be: py -m venv .venv py ... # Whatever you would normally use `python` for during development. This creates a virtual environment in a .venv directory using the latest version of Python installed. Subsequent uses of py will then use that virtual environment as long as it is in the current (or higher) directory; no environment activation required (although the Python Launcher supports activated environments as well)! A non-goal of this launcher is to become the way to launch the Python interpreter all the time. If you know the exact interpreter you want to launch then you should launch it directly; same goes for when you have requirements on the type of interpreter you want. The Python Launcher should be viewed as a tool of convenience, not necessity.} %description %{_description} %package -n %{crate} Summary: %{summary} Provides: py = %{?epoch:%{epoch}:}%{version}-%{release} Provides: py%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} # 0BSD or MIT or ASL 2.0: rust-adler 1.0.2 # ASL 2.0 or MIT: rust-addr2line 0.16.0 # ASL 2.0 or MIT: rust-autocfg 1.0.1 # ASL 2.0 or MIT: rust-gimli 0.25.0 # ASL 2.0 or MIT: rust-lock_api 0.4.5 # ASL 2.0 or MIT: rust-object 0.26.2 # ASL 2.0 or MIT: rust-parking_lot 0.11.2 # ASL 2.0 or MIT: rust-parking_lot_core 0.8.5 # ASL 2.0 or MIT: rust-signal-hook 0.3.13 # ASL 2.0 or MIT: rust-signal-hook-mio 0.2.1 # ASL 2.0 or MIT: rust-signal-hook-registry 1.4.0 # ASL 2.0 or MIT: rust-thread_local 1.1.4 # ASL 2.0 or MIT: rust-uuid 0.8.2 # ASL 2.0: rust-exitcode 1.1.2 # BSD: rust-instant 0.1.12 # MIT or ASL 2.0: rust-backtrace 0.3.61 # MIT or ASL 2.0: rust-bitflags 1.3.2 # MIT or ASL 2.0: rust-cc 1.0.72 # MIT or ASL 2.0: rust-cfg-if 1.0.0 # MIT or ASL 2.0: rust-chrono 0.4.19 # MIT or ASL 2.0: rust-getrandom 0.2.3 # MIT or ASL 2.0: rust-heck0.3 0.3.3 # MIT or ASL 2.0: rust-human-panic 1.0.3 # MIT or ASL 2.0: rust-libc 0.2.113 # MIT or ASL 2.0: rust-log 0.4.14 # MIT or ASL 2.0: rust-num-integer 0.1.44 # MIT or ASL 2.0: rust-num-traits 0.2.14 # MIT or ASL 2.0: rust-once_cell 1.9.0 # MIT or ASL 2.0: rust-proc-macro2 1.0.36 # MIT or ASL 2.0: rust-quote 1.0.14 # MIT or ASL 2.0: rust-regex 1.5.4 # MIT or ASL 2.0: rust-regex-syntax 0.6.25 # MIT or ASL 2.0: rust-rustc-demangle 0.1.21 # MIT or ASL 2.0: rust-scopeguard 1.1.0 # MIT or ASL 2.0: rust-serde 1.0.134 # MIT or ASL 2.0: rust-serde_derive 1.0.134 # MIT or ASL 2.0: rust-smallvec 1.7.0 # MIT or ASL 2.0: rust-stderrlog 0.5.1 # MIT or ASL 2.0: rust-syn 1.0.86 # MIT or ASL 2.0: rust-time0.1 0.1.44 # MIT or ASL 2.0: rust-toml 0.5.8 # MIT or ASL 2.0: rust-unicode-segmentation 1.8.0 # MIT or ASL 2.0: rust-unicode-width 0.1.9 # MIT or ASL 2.0: rust-unicode-xid 0.2.2 # MIT or zlib or ASL 2.0: rust-miniz_oxide 0.4.4 # MIT: rust-atty 0.2.14 # MIT: rust-comfy-table 4.1.1 # MIT: rust-crossterm 0.20.0 # MIT: rust-memoffset 0.6.5 # MIT: rust-mio 0.7.14 # MIT: rust-nix0.22 0.22.2 # MIT: rust-os_type 2.4.0 # MIT: rust-strum 0.21.0 # MIT: rust-strum_macros 0.21.1 # Unlicense or MIT: rust-aho-corasick 0.7.18 # Unlicense or MIT: rust-memchr 2.4.1 # Unlicense or MIT: rust-termcolor 1.1.2 License: MIT and ASL 2.0 and BSD %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/py %dir %{_datadir}/fish %dir %{_datadir}/fish/vendor_completions.d %{_datadir}/fish/vendor_completions.d/py.fish %{_mandir}/man1/py.1.* %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license LICENSE %doc README.md CHANGELOG.md %{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install # install man page mkdir -p %{buildroot}/%{_mandir}/man1 cp -pav docs/man-page/py.1 %{buildroot}/%{_mandir}/man1/ # install fish completions mkdir -p %{buildroot}/%{_datadir}/fish/vendor_completions.d cp -pav completions/py.fish %{buildroot}/%{_datadir}/fish/vendor_completions.d/ %if %{with check} %check # skip a test which relies on files that are not included in published crates %cargo_test -- -- --skip unexecutable %endif %changelog * Sat Jul 23 2022 Fedora Release Engineering 1.0.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek 1.0.0-5 - Rebuild with package notes * Tue Jan 25 2022 Fabio Valentini 1.0.0-4 - Rebuild with thread_local 1.1.4 for RUSTSEC-2022-0006 * Fri Jan 21 2022 Fedora Release Engineering 1.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Nov 14 2021 Robert-André Mauchin 1.0.0-2 - Bump assert_cmd to 2.0.0 * Fri Sep 03 2021 Fabio Valentini 1.0.0-1 - Initial import (#2000931)