Blame SPECS/micropipenv.spec

198bfe
%bcond_with check
198bfe
198bfe
Name:           micropipenv
198bfe
Version:        1.0.2
198bfe
Release:        1%{?dist}
198bfe
Summary:        A simple wrapper around pip to support Pipenv and Poetry files
198bfe
198bfe
License:        LGPLv3+
198bfe
URL:            https://github.com/thoth-station/%{name}
198bfe
Source0:        %{url}/archive/v%{version}.tar.gz
198bfe
BuildArch:      noarch
198bfe
198bfe
BuildRequires:  python3-devel
198bfe
BuildRequires:  python3-pip
198bfe
BuildRequires:  python3-setuptools
198bfe
BuildRequires:  python3-pytoml
198bfe
%if %{with check}
198bfe
# For testing
198bfe
# Most of the test dependencies are not packaged in RHEL but can be pip-installed
198bfe
BuildRequires:  python3dist(flexmock)
198bfe
BuildRequires:  python3dist(pytest)
198bfe
BuildRequires:  python3dist(pytest-timeout)
198bfe
BuildRequires:  python3dist(pytest-venv)
198bfe
%endif
198bfe
198bfe
%{?python_provide:%python_provide python3-%{name}}
198bfe
198bfe
Requires:       python3-pip
198bfe
Requires:       python3-setuptools
198bfe
Requires:       python3-pytoml
198bfe
198bfe
%description
198bfe
A lightweight wrapper for pip to support Pipenv and Poetry lock files or
198bfe
converting them to pip-tools compatible output.
198bfe
198bfe
%prep
198bfe
%autosetup -n %{name}-%{version}
198bfe
# Remove shebang line from the module
198bfe
sed -i '1{\@^#!/usr/bin/env python@d}' %{name}.py
198bfe
198bfe
%build
198bfe
%py3_build
198bfe
198bfe
%install
198bfe
%py3_install
198bfe
# Switch pip executable from pip to pip3.6
198bfe
sed -i 's/_PIP_BIN = os.getenv("MICROPIPENV_PIP_BIN", "pip")/_PIP_BIN = os.getenv("MICROPIPENV_PIP_BIN", "pip3.6")/' %{buildroot}%{python3_sitelib}/micropipenv.py
198bfe
198bfe
%check
198bfe
%if %{with check}
198bfe
# - skipped tests requires internet
198bfe
# - skipped check of pip version - micropipenv is coupled with pip and checks
198bfe
#   if it's using the latest version, but it's being tested upstream with old
198bfe
#   RHEL versions as well, and if the rest of the test suite is passing, there
198bfe
#   should not be issues
198bfe
%{python3} -m pytest tests -m "not online" -k "not test_check_pip_version"
198bfe
%endif
198bfe
198bfe
%files
198bfe
%doc README.rst
198bfe
%license LICENSE*
198bfe
%{_bindir}/micropipenv
198bfe
%{python3_sitelib}/%{name}.py
198bfe
%{python3_sitelib}/__pycache__/%{name}*.pyc
198bfe
%{python3_sitelib}/%{name}-%{version}-py*.egg-info/
198bfe
198bfe
%changelog
198bfe
* Fri Dec 11 2020 Lumír Balhar <lbalhar@redhat.com> - 1.0.2-1
198bfe
- Update to 1.0.2 to fix tests
198bfe
Resolves: rhbz#1849096
198bfe
198bfe
* Mon Nov 02 2020 Tomas Orsava <torsava@redhat.com> - 1.0.0-1
198bfe
- Update to 1.0.0
198bfe
- Resolves: rhbz#1849096
198bfe
198bfe
* Mon Sep 07 2020 Tomas Orsava <torsava@redhat.com> - 0.6.0-1
198bfe
- Update to 0.6.0
198bfe
- Resolves: rhbz#1849096
198bfe
198bfe
* Fri Jul 17 2020 Lumír Balhar <lbalhar@redhat.com> - 0.4.0-2
198bfe
- Initial RHEL8 packaging
198bfe
- Resolves: rhbz#1849096
198bfe
198bfe
* Thu Jul 09 2020 Lumír Balhar <lbalhar@redhat.com> - 0.4.0-1
198bfe
- Update to 0.4.0 (#1854424)
198bfe
198bfe
* Mon Jun 15 2020 Lumír Balhar <lbalhar@redhat.com> - 0.3.0-1
198bfe
- Update to 0.3.0 (#1846944)
198bfe
198bfe
* Fri Jun 05 2020 Miro Hrončok <mhroncok@redhat.com> - 0.2.0-2
198bfe
- Correct the license tag (GPLv3+ to LGPLv3+)
198bfe
- Include the actual LICENSE files in the package
198bfe
198bfe
* Thu Jun 04 2020 Lumír Balhar <lbalhar@redhat.com> - 0.2.0-1
198bfe
- Update to 0.2.0 (#1838278, #1841641)
198bfe
198bfe
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.6-2
198bfe
- Rebuilt for Python 3.9
198bfe
198bfe
* Tue May 05 2020 Lumír Balhar <lbalhar@redhat.com> - 0.1.6-1
198bfe
- Update to 0.1.6 (#1831328)
198bfe
198bfe
* Tue Apr 07 2020 Lumír Balhar <lbalhar@redhat.com> - 0.1.5-1
198bfe
- Update to 0.1.5 (#1821807)
198bfe
198bfe
* Thu Mar 12 2020 Lumír Balhar <lbalhar@redhat.com> - 0.1.4-1
198bfe
- Initial package.