2023-05-11 16:00:00 +00:00
|
|
|
# some test dependencies are unwanted in RHEL
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%bcond_with tests
|
|
|
|
%else
|
|
|
|
%bcond_without tests
|
|
|
|
%endif
|
|
|
|
|
2020-03-16 13:37:41 +00:00
|
|
|
Name: micropipenv
|
2023-11-08 08:19:25 +00:00
|
|
|
Version: 1.5.2
|
2023-02-22 21:04:57 +00:00
|
|
|
Release: %autorelease
|
2020-03-16 13:37:41 +00:00
|
|
|
Summary: A simple wrapper around pip to support Pipenv and Poetry files
|
|
|
|
|
2023-05-19 09:40:52 +00:00
|
|
|
License: LGPL-3.0-or-later
|
2020-03-16 13:37:41 +00:00
|
|
|
URL: https://github.com/thoth-station/%{name}
|
|
|
|
Source0: %{url}/archive/v%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
2020-05-05 17:01:30 +00:00
|
|
|
|
2020-03-16 13:37:41 +00:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
2022-10-04 00:06:41 +00:00
|
|
|
%py_provides python3-%{name}
|
2020-03-16 13:37:41 +00:00
|
|
|
|
2022-10-04 00:02:19 +00:00
|
|
|
Recommends: micropipenv+toml
|
2020-03-16 13:37:41 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A lightweight wrapper for pip to support Pipenv and Poetry lock files or
|
|
|
|
converting them to pip-tools compatible output.
|
|
|
|
|
2022-10-04 00:02:19 +00:00
|
|
|
%pyproject_extras_subpkg -n %{name} toml
|
|
|
|
|
2020-03-16 13:37:41 +00:00
|
|
|
%prep
|
2021-03-12 09:48:26 +00:00
|
|
|
%autosetup
|
2020-03-16 13:37:41 +00:00
|
|
|
# Remove shebang line from the module
|
|
|
|
sed -i '1{\@^#!/usr/bin/env python@d}' %{name}.py
|
|
|
|
|
2022-07-26 07:27:04 +00:00
|
|
|
%generate_buildrequires
|
2023-05-11 16:00:00 +00:00
|
|
|
%pyproject_buildrequires -r %{?with_tests:-t} -x toml
|
2022-07-26 07:27:04 +00:00
|
|
|
|
2020-03-16 13:37:41 +00:00
|
|
|
%build
|
2022-07-26 07:27:04 +00:00
|
|
|
%pyproject_wheel
|
2020-03-16 13:37:41 +00:00
|
|
|
|
|
|
|
%install
|
2022-07-26 07:27:04 +00:00
|
|
|
%pyproject_install
|
|
|
|
%pyproject_save_files %{name}
|
2020-03-16 13:37:41 +00:00
|
|
|
|
|
|
|
%check
|
2023-05-11 16:00:00 +00:00
|
|
|
%if %{with tests}
|
2020-10-22 12:43:34 +00:00
|
|
|
# skipped tests requires internet or checks pip version
|
2022-02-21 09:39:11 +00:00
|
|
|
%pytest -m "not online" -k "not test_check_pip_version and not test_install_invalid_toml_file"
|
2023-05-11 16:00:00 +00:00
|
|
|
%else
|
|
|
|
%pyproject_check_import
|
|
|
|
%endif
|
2020-03-16 13:37:41 +00:00
|
|
|
|
2022-07-26 07:27:04 +00:00
|
|
|
%files -f %pyproject_files
|
2020-03-16 13:37:41 +00:00
|
|
|
%doc README.rst
|
|
|
|
%{_bindir}/micropipenv
|
|
|
|
|
|
|
|
%changelog
|
2023-02-22 21:04:57 +00:00
|
|
|
%autochangelog
|