2019-12-18 10:30:42 +00:00
|
|
|
#
|
2023-01-15 20:07:46 +00:00
|
|
|
# spec file
|
2019-12-18 10:30:42 +00:00
|
|
|
#
|
2023-01-15 20:07:46 +00:00
|
|
|
# Copyright (c) 2023 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-10-09 15:50:00 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
|
2023-05-08 08:17:23 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2023-01-15 20:07:46 +00:00
|
|
|
Name: python-poetry%{psuffix}
|
2023-09-21 10:26:12 +00:00
|
|
|
Version: 1.6.1
|
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
|
2023-09-21 10:26:12 +00:00
|
|
|
Patch0: build-1.patch
|
2022-10-09 12:59:53 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2020-10-08 17:31:48 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2023-05-29 17:12:35 +00:00
|
|
|
BuildRequires: %{python_module poetry-core = 1.6.1}
|
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
|
2023-04-25 15:47:30 +00:00
|
|
|
Requires: python-build >= 0.10.0
|
2022-12-13 21:29:46 +00:00
|
|
|
Requires: python-cleo >= 2.0.0
|
|
|
|
Requires: python-crashtest >= 0.4.1
|
2023-04-25 15:47:30 +00:00
|
|
|
Requires: python-dulwich >= 0.21.2
|
2022-12-13 21:29:46 +00:00
|
|
|
Requires: python-filelock >= 3.8.0
|
2019-12-18 10:30:42 +00:00
|
|
|
Requires: python-html5lib >= 1.0
|
2023-05-29 17:12:35 +00:00
|
|
|
Requires: python-poetry-core = 1.6.1
|
|
|
|
Requires: python-poetry-plugin-export >= 1.4.0
|
2022-12-13 21:29:46 +00:00
|
|
|
%if 0%{?python_version_nodots} < 310
|
|
|
|
Requires: python-importlib-metadata >= 4.4
|
|
|
|
%endif
|
2023-04-25 15:47:30 +00:00
|
|
|
Requires: python-installer >= 0.7.0
|
2022-10-09 12:59:53 +00:00
|
|
|
Requires: python-jsonschema >= 4.10.0
|
2022-12-13 21:29:46 +00:00
|
|
|
Requires: python-keyring >= 23.9.0
|
|
|
|
Requires: python-lockfile >= 0.12.2
|
2021-12-04 21:54:10 +00:00
|
|
|
Requires: python-packaging >= 20.4
|
2020-03-24 11:12:47 +00:00
|
|
|
Requires: python-pexpect >= 4.7.0
|
2023-04-25 15:47:30 +00:00
|
|
|
Requires: python-pkginfo >= 1.9.4
|
2023-05-22 20:57:51 +00:00
|
|
|
Requires: python-platformdirs >= 3.0.0
|
2023-04-25 15:47:30 +00:00
|
|
|
Requires: python-pyproject-hooks >= 1.0.0
|
2019-12-18 10:30:42 +00:00
|
|
|
Requires: python-requests >= 2.18
|
2022-10-09 12:59:53 +00:00
|
|
|
Requires: python-shellingham >= 1.5
|
2023-05-08 20:37:49 +00:00
|
|
|
Requires: (python-requests-toolbelt >= 0.9.1 with python-requests-toolbelt < 2)
|
2022-12-13 21:29:46 +00:00
|
|
|
%if 0%{?python_version_nodots} < 311
|
2022-12-14 13:03:29 +00:00
|
|
|
Requires: python-tomli >= 2.0.1
|
2022-10-09 12:59:53 +00:00
|
|
|
%endif
|
2022-12-13 21:29:46 +00:00
|
|
|
Requires: python-trove-classifiers >= 2022.5.19
|
|
|
|
Requires: python-urllib3 >= 1.26.0
|
2023-05-22 20:57:51 +00:00
|
|
|
Requires: python-virtualenv >= 20.22
|
2022-12-13 21:29:46 +00:00
|
|
|
Requires: (python-tomlkit >= 0.11.4 with python-tomlkit < 1.0)
|
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
|
2022-10-09 15:50:00 +00:00
|
|
|
%if %{with test}
|
2023-05-22 20:57:51 +00:00
|
|
|
BuildRequires: %{python_module cachy >= 0.3.0}
|
|
|
|
BuildRequires: %{python_module deepdiff >= 6.3}
|
2022-10-09 15:50:00 +00:00
|
|
|
BuildRequires: %{python_module httpretty >= 1.0}
|
2023-02-24 12:37:12 +00:00
|
|
|
# Required because deepdiff > 6.2.3
|
|
|
|
BuildRequires: %{python_module orjson}
|
2022-10-09 15:50:00 +00:00
|
|
|
BuildRequires: %{python_module poetry = %{version}}
|
|
|
|
BuildRequires: %{python_module psutil}
|
|
|
|
BuildRequires: %{python_module pytest >= 7.1}
|
2023-04-25 16:14:08 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock >= 3.9}
|
|
|
|
BuildRequires: %{python_module pytest-xdist >= 3.1}
|
2020-10-06 08:31:48 +00:00
|
|
|
BuildRequires: git-core
|
2022-10-09 15:50:00 +00:00
|
|
|
%endif
|
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}
|
2023-05-22 20:57:51 +00:00
|
|
|
for f in console/events/console_events.py \
|
2022-10-09 15:50:00 +00:00
|
|
|
layouts/standard.py; do
|
|
|
|
[ -e src/poetry/$f ] || exit 1 # file does not exist
|
|
|
|
[ ! -s src/poetry/$f ] && echo "# empty module" >> src/poetry/$f || exit 2 # file is not empty
|
|
|
|
done
|
2019-12-18 10:30:42 +00:00
|
|
|
|
2022-10-09 15:50:00 +00:00
|
|
|
%if !%{with test}
|
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}
|
2022-10-09 15:50:00 +00:00
|
|
|
%endif
|
2019-12-18 10:30:42 +00:00
|
|
|
|
2022-10-09 15:50:00 +00:00
|
|
|
%if %{with test}
|
2019-12-18 10:30:42 +00:00
|
|
|
%check
|
2022-10-10 20:18:09 +00:00
|
|
|
# can't install setuptools from PyPI (no network)
|
2023-05-02 21:08:06 +00:00
|
|
|
donttest="test_uninstall_git_package_nspkg_pth_cleanup or test_builder_setup_generation_runs_with_pip_editable"
|
2023-05-22 20:57:51 +00:00
|
|
|
donttest="$donttest or test_installer_with_pypi_repository"
|
2022-10-10 20:18:09 +00:00
|
|
|
# does not find the expected packages in venv
|
|
|
|
donttest="$donttest or test_executor_should_write_pep610_url_references"
|
2023-04-25 15:47:30 +00:00
|
|
|
donttest="$donttest or test_prepare_directory or test_prepare_sdist"
|
2022-10-09 15:50:00 +00:00
|
|
|
%{python_expand # pytest needs to be called from the virtualenv python interpreter gh#python-poetry/poetry#1645
|
2020-10-21 09:16:00 +00:00
|
|
|
virtualenv-%{$python_bin_suffix} --system-site-packages testenv-%{$python_bin_suffix}
|
|
|
|
source testenv-%{$python_bin_suffix}/bin/activate
|
|
|
|
export PYTHONDONTWRITEBYTECODE=1
|
2022-10-10 20:18:09 +00:00
|
|
|
python -m pytest -v -k "not ($donttest)"
|
2020-10-21 09:16:00 +00:00
|
|
|
deactivate
|
|
|
|
}
|
2022-10-09 15:50:00 +00:00
|
|
|
%endif
|
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
|
|
|
|
|
2022-10-09 15:50:00 +00:00
|
|
|
%if !%{with test}
|
2019-12-18 10:30:42 +00:00
|
|
|
%files %{python_files}
|
2023-04-25 15:47:30 +00:00
|
|
|
%doc README.md
|
2019-12-18 10:30:42 +00:00
|
|
|
%license LICENSE
|
2020-07-29 14:53:31 +00:00
|
|
|
%{python_sitelib}/poetry
|
2023-01-15 20:07:46 +00:00
|
|
|
%{python_sitelib}/poetry-%{version}.dist-info
|
2020-05-18 20:18:32 +00:00
|
|
|
%python_alternative %{_bindir}/poetry
|
2022-10-09 15:50:00 +00:00
|
|
|
%endif
|
2019-12-18 10:30:42 +00:00
|
|
|
|
|
|
|
%changelog
|