# # spec file for package python-poetry # # 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/ # Name: python-poetry Version: 1.2.1 Release: 0 Summary: Python dependency management and packaging License: MIT Group: Development/Languages/Python URL: https://python-poetry.org/ # PyPI sdist doesnt contain tests Source: https://github.com/python-poetry/poetry/archive/%{version}.tar.gz#/poetry-%{version}.tar.gz BuildRequires: %{python_module CacheControl >= 0.12.9} BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module cachy >= 0.3.0} BuildRequires: %{python_module cleo >= 1.0.0~a5} BuildRequires: %{python_module crashtest >= 0.3.0} BuildRequires: %{python_module html5lib >= 1.0} BuildRequires: %{python_module importlib-metadata >= 4.4 if %python-base < 3.10} BuildRequires: %{python_module jsonschema >= 4.10.0} BuildRequires: %{python_module keyring >= 21.2.0} BuildRequires: %{python_module plugin-export >= 1.0.7} BuildRequires: %{python_module poetry-core >= 1.2.0} # cachecontrol[filecache] BuildRequires: %{python_module lockfile >= 0.9} BuildRequires: %{python_module packaging >= 20.4} BuildRequires: %{python_module pexpect >= 4.7.0} BuildRequires: %{python_module pip} BuildRequires: %{python_module pkginfo >= 1.5} BuildRequires: %{python_module requests >= 2.18} BuildRequires: %{python_module requests-toolbelt >= 0.9.1} BuildRequires: %{python_module shellingham >= 1.5} BuildRequires: %{python_module tomlkit >= 0.11.4} BuildRequires: %{python_module virtualenv >= 20.4.7} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-CacheControl >= 0.12.9 Requires: python-cachy >= 0.3.0 Requires: python-cleo >= 1.0.0~a5 Requires: python-crashtest >= 0.3.0 Requires: python-html5lib >= 1.0 Requires: python-jsonschema >= 4.10.0 Requires: python-keyring >= 21.2.0 Requires: python-plugin-export >= 1.0.7 Requires: python-poetry-core >= 1.2.0 # cachecontrol[filecache] Requires: python-lockfile >= 0.9 Requires: python-packaging >= 20.4 Requires: python-pexpect >= 4.7.0 Requires: python-pkginfo >= 1.5 Requires: python-requests >= 2.18 Requires: python-requests-toolbelt >= 0.9.1 Requires: python-shellingham >= 1.5 Requires: python-tomlkit >= 0.11.4 Requires: python-virtualenv >= 20.47 %if 0%{?python_version_nodots} < 310 Requires: python-importlib-metadata >= 4.4 %endif Requires(post): update-alternatives Requires(postun):update-alternatives Recommends: git-core Recommends: python-devel BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module httpretty >= 1.0.3} BuildRequires: %{python_module pytest-mock >= 3.5} BuildRequires: %{python_module pytest} BuildRequires: git-core # /SECTION %python_subpackages %description Python dependency management and packaging made easy. %prep %autosetup -p1 -n poetry-%{version} rm src/poetry/_vendor/.gitignore rmdir src/poetry/_vendor find poetry -name '*.py' -executable -print0 | xargs -0 chmod a-x %build %pyproject_wheel %install %pyproject_install %python_clone -a %{buildroot}%{_bindir}/poetry %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # discussion of this section: gh#python-poetry/poetry#1645 %{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 python -m pytest -v tests deactivate } %post %python_install_alternative poetry %postun %python_uninstall_alternative poetry %files %{python_files} %doc README.md CHANGELOG.md %license LICENSE %{python_sitelib}/poetry %{python_sitelib}/poetry-%{version}*-info %python_alternative %{_bindir}/poetry %changelog