2019-12-18 10:30:42 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-poetry
|
|
|
|
#
|
2021-04-15 09:20:23 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2019-12-18 10:30:42 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-12-04 21:54:10 +00:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
2019-12-18 10:30:42 +00:00
|
|
|
%define skip_python2 1
|
|
|
|
Name: python-poetry
|
2021-12-04 21:54:10 +00:00
|
|
|
Version: 1.1.12
|
2019-12-18 10:30:42 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python dependency management and packaging
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
2020-10-06 08:31:48 +00:00
|
|
|
URL: https://python-poetry.org/
|
2020-10-08 17:31:48 +00:00
|
|
|
# PyPI sdist doesnt contain tests
|
2020-10-06 08:31:48 +00:00
|
|
|
Source: https://github.com/python-poetry/poetry/archive/%{version}.tar.gz#/poetry-%{version}.tar.gz
|
2020-10-21 09:44:18 +00:00
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/python-poetry/poetry/pull/3255#issuecomment-713442094 -- remove external http call requirement for lock --no-update
|
|
|
|
Patch0: poetry-1645-1.1.patch
|
2021-06-16 09:25:55 +00:00
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/python-poetry/poetry/commit/9591e88492508d4dba260952d53266a0032c04c7
|
|
|
|
Patch1: use-new-name-of-MockFixture.patch
|
2021-12-04 21:54:10 +00:00
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/python-poetry/poetry/pull/4749 -- make compatible with packaging >= 21
|
2021-12-04 20:49:29 +00:00
|
|
|
Patch2: poetry-4749-1.1.patch
|
2021-12-17 18:16:07 +00:00
|
|
|
# PATCH-FIX-UPSTREAM poetry-3544-py310.patch -- gh#python-poetry/poetry#3544 -- python310 fixes
|
|
|
|
Patch3: https://github.com/python-poetry/poetry/pull/3544.patch#/poetry-3544-py310.patch
|
2021-12-04 21:54:10 +00:00
|
|
|
BuildRequires: %{python_module CacheControl >= 0.12.9}
|
2020-03-24 11:12:47 +00:00
|
|
|
BuildRequires: %{python_module cachy >= 0.3.0}
|
2021-04-15 09:20:23 +00:00
|
|
|
BuildRequires: %{python_module cleo >= 0.8.1}
|
2020-10-06 08:31:48 +00:00
|
|
|
BuildRequires: %{python_module clikit >= 0.6.2}
|
2019-12-18 10:30:42 +00:00
|
|
|
BuildRequires: %{python_module html5lib >= 1.0}
|
2021-12-04 21:54:10 +00:00
|
|
|
BuildRequires: %{python_module importlib-metadata if %python-base < 3.6}
|
2020-10-06 08:31:48 +00:00
|
|
|
BuildRequires: %{python_module keyring >= 21.2.0}
|
2021-12-04 21:54:10 +00:00
|
|
|
# cachecontrol[filecache]
|
|
|
|
BuildRequires: %{python_module lockfile >= 0.9}
|
|
|
|
BuildRequires: %{python_module packaging >= 20.4}
|
2020-10-08 17:31:48 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2021-12-04 21:54:10 +00:00
|
|
|
BuildRequires: %{python_module pkginfo >= 1.5}
|
|
|
|
BuildRequires: %{python_module poetry-core >= 1.0.7}
|
2019-12-18 10:30:42 +00:00
|
|
|
BuildRequires: %{python_module requests >= 2.18}
|
2020-10-06 08:31:48 +00:00
|
|
|
BuildRequires: %{python_module requests-toolbelt >= 0.9.1}
|
2019-12-18 10:30:42 +00:00
|
|
|
BuildRequires: %{python_module shellingham >= 1.1}
|
2020-10-06 08:31:48 +00:00
|
|
|
BuildRequires: %{python_module tomlkit >= 0.7.0}
|
|
|
|
BuildRequires: %{python_module virtualenv}
|
2019-12-18 10:30:42 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2021-12-04 21:54:10 +00:00
|
|
|
Requires: python-CacheControl >= 0.12.9
|
2020-03-24 11:12:47 +00:00
|
|
|
Requires: python-cachy >= 0.3.0
|
2020-10-06 08:31:48 +00:00
|
|
|
Requires: python-cleo >= 0.8.0
|
|
|
|
Requires: python-clikit >= 0.6.2
|
2019-12-18 10:30:42 +00:00
|
|
|
Requires: python-html5lib >= 1.0
|
2020-10-06 08:31:48 +00:00
|
|
|
Requires: python-keyring >= 21.2.0
|
2021-12-04 21:54:10 +00:00
|
|
|
# cachecontrol[filecache]
|
|
|
|
Requires: python-lockfile >= 0.9
|
|
|
|
Requires: python-packaging >= 20.4
|
2020-03-24 11:12:47 +00:00
|
|
|
Requires: python-pexpect >= 4.7.0
|
2021-12-17 18:16:07 +00:00
|
|
|
Requires: python-pkginfo >= 1.5
|
2021-12-04 21:54:10 +00:00
|
|
|
Requires: python-poetry-core >= 1.0.7
|
2019-12-18 10:30:42 +00:00
|
|
|
Requires: python-requests >= 2.18
|
2020-10-06 08:31:48 +00:00
|
|
|
Requires: python-requests-toolbelt >= 0.9.1
|
2019-12-18 10:30:42 +00:00
|
|
|
Requires: python-shellingham >= 1.1
|
2020-10-06 08:31:48 +00:00
|
|
|
Requires: python-tomlkit >= 0.7.0
|
2020-10-08 13:37:52 +00:00
|
|
|
Requires: python-virtualenv >= 20.0.26
|
2020-10-06 08:31:48 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-15 09:20:23 +00:00
|
|
|
Requires(postun):update-alternatives
|
2019-12-18 10:30:42 +00:00
|
|
|
Recommends: git-core
|
|
|
|
Recommends: python-devel
|
|
|
|
BuildArch: noarch
|
2020-10-06 08:31:48 +00:00
|
|
|
# SECTION test requirements
|
2021-04-15 09:20:23 +00:00
|
|
|
BuildRequires: %{python_module httpretty >= 1.0.3}
|
2021-06-16 09:25:55 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock >= 3.5}
|
2020-10-06 08:31:48 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: git-core
|
|
|
|
# /SECTION
|
2019-12-18 10:30:42 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python dependency management and packaging made easy.
|
|
|
|
|
|
|
|
%prep
|
2020-10-21 09:16:00 +00:00
|
|
|
%autosetup -p1 -n poetry-%{version}
|
2020-10-08 17:31:48 +00:00
|
|
|
rm poetry/_vendor/.gitignore
|
|
|
|
rmdir poetry/_vendor
|
|
|
|
find poetry -name '*.py' -executable -print0 | xargs -0 chmod a-x
|
2019-12-18 10:30:42 +00:00
|
|
|
|
|
|
|
%build
|
2020-10-08 17:31:48 +00:00
|
|
|
%pyproject_wheel
|
2019-12-18 10:30:42 +00:00
|
|
|
|
|
|
|
%install
|
2020-10-08 17:31:48 +00:00
|
|
|
%pyproject_install
|
2020-05-18 20:11:41 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/poetry
|
2019-12-18 10:30:42 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2020-10-21 09:44:18 +00:00
|
|
|
# discussion of this section: gh#python-poetry/poetry#1645
|
2020-10-21 09:16:00 +00:00
|
|
|
%{python_expand # a virtualenv is necessary
|
|
|
|
virtualenv-%{$python_bin_suffix} --system-site-packages testenv-%{$python_bin_suffix}
|
|
|
|
source testenv-%{$python_bin_suffix}/bin/activate
|
|
|
|
export PYTHONPATH="%{buildroot}%{$python_sitelib}"
|
|
|
|
export PYTHONDONTWRITEBYTECODE=1
|
|
|
|
# pytest needs to be called from the virtualenv python interpreter
|
2020-10-21 09:44:18 +00:00
|
|
|
python -m pytest -v tests
|
2020-10-21 09:16:00 +00:00
|
|
|
deactivate
|
|
|
|
}
|
2019-12-18 10:30:42 +00:00
|
|
|
|
2020-05-18 20:11:41 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative poetry
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative poetry
|
|
|
|
|
2019-12-18 10:30:42 +00:00
|
|
|
%files %{python_files}
|
2020-10-06 08:31:48 +00:00
|
|
|
%doc README.md CHANGELOG.md
|
2019-12-18 10:30:42 +00:00
|
|
|
%license LICENSE
|
2020-07-29 14:53:31 +00:00
|
|
|
%{python_sitelib}/poetry
|
2020-10-27 12:09:30 +00:00
|
|
|
%{python_sitelib}/poetry-%{version}*-info
|
2020-05-18 20:18:32 +00:00
|
|
|
%python_alternative %{_bindir}/poetry
|
2019-12-18 10:30:42 +00:00
|
|
|
|
|
|
|
%changelog
|