14
0
forked from pool/python-poetry
Files
python-poetry/python-poetry.spec

156 lines
5.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-poetry
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-poetry%{psuffix}
Accepting request 1252363 from home:ecsos:python - Update to 2.1.1 * Fixed - Fix an issue where poetry env use python does not choose the Python from the PATH (#10187). - Changes from 2.1.0 * Added - Make build command build-system agnostic (#10059, #10092). - Add a --config-settings option to poetry build (#10059). - Add support for defining config-settings when building dependencies (#10129). - Add (experimental) commands to manage Python installations (#10112). - Use findpython to find the Python interpreters (#10097). - Add a --no-truncate option to poetry show (#9580). - Re-add support for passwords with empty usernames (#10088). - Add better error messages (#10053, #10065, #10126, #10127, #10132). * Changed - poetry new defaults to "src" layout by default (#10135). - Improve performance of locking dependencies (#10111, #10114, #10138, #10146). - Deprecate adding sources without specifying --priority (#10134). * Fixed - Fix an issue where global options were not handled correctly when positioned after command options (#10021, #10067, #10128). - Fix an issue where building a dependency from source failed because of a conflict between build-system dependencies that were not required for the target environment (#10048). - Fix an issue where poetry init was not able to find a package on PyPI while adding dependencies interactively (#10055). - Fix an issue where the @latest descriptor was incorrectly passed to the core requirement parser (#10069). - Fix an issue where Boolean environment variables set to True (in contrast to true) were interpreted as false (#10080). - Fix an issue where poetry env activate reported a misleading error message (#10087). - Fix an issue where adding an optional dependency with poetry add --optional would not correctly update the lock file (#10076). - Fix an issue where pip was not installed/updated before other dependencies resulting in a race condition (#10102). - Fix an issue where Poetry freezes when multiple threads attempt to unlock the keyring simultaneously (#10062). - Fix an issue where markers with extras were not locked correctly (#10119). - Fix an issue where self-referential extras were not resolved correctly (#10106). - Fix an issue where Poetry could not be run from a zipapp (#10074). - Fix an issue where installation failed with a permission error when using the system environment as a user without write access to system site packages (#9014). - Fix an issue where a version of a dependency that is not compatible with the project's python constraint was locked. (#10141). - Fix an issue where Poetry wrongly reported that the current project's supported Python range is not compatible with some of the required packages Python requirement (#10157). - Fix an issue where the requested extras of a dependency were ignored if the same dependency (with same extras) was specified in multiple groups (#10158). * Docs - Sort commands by name in the CLI reference (#10035). - Add missing documentation for env commands (#10027). - Clarify that the name and version fields are always required if the project section is specified (#10033). - Add a note about restarting the shell for tab completion changes to take effect (#10070). - Fix the example for project.gui-scripts #10121. - Explain how to include files as scripts in the project configuration (#9572, #10133). - Add additional information on specifying required python versions (#10104). - Changes from 2.0.1 * Added - Add support for poetry search in legacy sources (#9949). - Add a message in the poetry source show output when PyPI is implicitly enabled (#9974). * Changed - Improve performance for merging markers from overrides at the end of dependency resolution (#10018). * Fixed - Fix an issue where poetry sync did not remove packages that were not requested (#9946). - Fix an issue where poetry check failed even though there were just warnings and add a --strict option to fail on warnings (#9983). - Fix an issue where poetry update, poetry add and poetry remove with --only uninstalled packages from other groups (#10014). - Fix an issue where poetry update, poetry add and poetry remove uninstalled all extra packages (#10016). - Fix an issue where poetry self update did not recognize Poetry's own environment (#9995). - Fix an issue where read-only system site-packages were not considered when loading an environment with system site-packages (#9942). - Fix an issue where an error message in poetry install started with Warning: instead of Error: (#9945). - Fix an issue where Command.set_poetry, which is used by plugins, was removed (#9981). - Fix an issue where the help text of poetry build --clean showed a malformed short option instead of the description (#9994). * Docs - Add a FAQ entry for the migration from Poetry-specific fields to the project section (#9996). - Fix examples for project.readme and project.urls (#9948). - Add a warning that package sources are a Poetry-specific feature that is not included in core metadata (#9935). - Replace poetry install --sync with poetry sync in the section about synchronizing dependencies (#9944). - Replace poetry shell with poetry env activate in the basic usage section (#9963). - Mention that project.name is always required when the project section is used (#9989). - Fix the constraint of poetry-plugin-export in the section about poetry export (#9954). OBS-URL: https://build.opensuse.org/request/show/1252363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-poetry?expand=0&rev=98
2025-03-12 09:58:03 +00:00
Version: 2.1.1
Release: 0
Summary: Python dependency management and packaging
License: MIT
URL: https://python-poetry.org/
# PyPI sdist doesn't contain tests
Source: https://github.com/python-poetry/poetry/archive/%{version}.tar.gz#/poetry-%{version}.tar.gz
Accepting request 1252363 from home:ecsos:python - Update to 2.1.1 * Fixed - Fix an issue where poetry env use python does not choose the Python from the PATH (#10187). - Changes from 2.1.0 * Added - Make build command build-system agnostic (#10059, #10092). - Add a --config-settings option to poetry build (#10059). - Add support for defining config-settings when building dependencies (#10129). - Add (experimental) commands to manage Python installations (#10112). - Use findpython to find the Python interpreters (#10097). - Add a --no-truncate option to poetry show (#9580). - Re-add support for passwords with empty usernames (#10088). - Add better error messages (#10053, #10065, #10126, #10127, #10132). * Changed - poetry new defaults to "src" layout by default (#10135). - Improve performance of locking dependencies (#10111, #10114, #10138, #10146). - Deprecate adding sources without specifying --priority (#10134). * Fixed - Fix an issue where global options were not handled correctly when positioned after command options (#10021, #10067, #10128). - Fix an issue where building a dependency from source failed because of a conflict between build-system dependencies that were not required for the target environment (#10048). - Fix an issue where poetry init was not able to find a package on PyPI while adding dependencies interactively (#10055). - Fix an issue where the @latest descriptor was incorrectly passed to the core requirement parser (#10069). - Fix an issue where Boolean environment variables set to True (in contrast to true) were interpreted as false (#10080). - Fix an issue where poetry env activate reported a misleading error message (#10087). - Fix an issue where adding an optional dependency with poetry add --optional would not correctly update the lock file (#10076). - Fix an issue where pip was not installed/updated before other dependencies resulting in a race condition (#10102). - Fix an issue where Poetry freezes when multiple threads attempt to unlock the keyring simultaneously (#10062). - Fix an issue where markers with extras were not locked correctly (#10119). - Fix an issue where self-referential extras were not resolved correctly (#10106). - Fix an issue where Poetry could not be run from a zipapp (#10074). - Fix an issue where installation failed with a permission error when using the system environment as a user without write access to system site packages (#9014). - Fix an issue where a version of a dependency that is not compatible with the project's python constraint was locked. (#10141). - Fix an issue where Poetry wrongly reported that the current project's supported Python range is not compatible with some of the required packages Python requirement (#10157). - Fix an issue where the requested extras of a dependency were ignored if the same dependency (with same extras) was specified in multiple groups (#10158). * Docs - Sort commands by name in the CLI reference (#10035). - Add missing documentation for env commands (#10027). - Clarify that the name and version fields are always required if the project section is specified (#10033). - Add a note about restarting the shell for tab completion changes to take effect (#10070). - Fix the example for project.gui-scripts #10121. - Explain how to include files as scripts in the project configuration (#9572, #10133). - Add additional information on specifying required python versions (#10104). - Changes from 2.0.1 * Added - Add support for poetry search in legacy sources (#9949). - Add a message in the poetry source show output when PyPI is implicitly enabled (#9974). * Changed - Improve performance for merging markers from overrides at the end of dependency resolution (#10018). * Fixed - Fix an issue where poetry sync did not remove packages that were not requested (#9946). - Fix an issue where poetry check failed even though there were just warnings and add a --strict option to fail on warnings (#9983). - Fix an issue where poetry update, poetry add and poetry remove with --only uninstalled packages from other groups (#10014). - Fix an issue where poetry update, poetry add and poetry remove uninstalled all extra packages (#10016). - Fix an issue where poetry self update did not recognize Poetry's own environment (#9995). - Fix an issue where read-only system site-packages were not considered when loading an environment with system site-packages (#9942). - Fix an issue where an error message in poetry install started with Warning: instead of Error: (#9945). - Fix an issue where Command.set_poetry, which is used by plugins, was removed (#9981). - Fix an issue where the help text of poetry build --clean showed a malformed short option instead of the description (#9994). * Docs - Add a FAQ entry for the migration from Poetry-specific fields to the project section (#9996). - Fix examples for project.readme and project.urls (#9948). - Add a warning that package sources are a Poetry-specific feature that is not included in core metadata (#9935). - Replace poetry install --sync with poetry sync in the section about synchronizing dependencies (#9944). - Replace poetry shell with poetry env activate in the basic usage section (#9963). - Mention that project.name is always required when the project section is used (#9989). - Fix the constraint of poetry-plugin-export in the section about poetry export (#9954). OBS-URL: https://build.opensuse.org/request/show/1252363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-poetry?expand=0&rev=98
2025-03-12 09:58:03 +00:00
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 2.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Accepting request 1252363 from home:ecsos:python - Update to 2.1.1 * Fixed - Fix an issue where poetry env use python does not choose the Python from the PATH (#10187). - Changes from 2.1.0 * Added - Make build command build-system agnostic (#10059, #10092). - Add a --config-settings option to poetry build (#10059). - Add support for defining config-settings when building dependencies (#10129). - Add (experimental) commands to manage Python installations (#10112). - Use findpython to find the Python interpreters (#10097). - Add a --no-truncate option to poetry show (#9580). - Re-add support for passwords with empty usernames (#10088). - Add better error messages (#10053, #10065, #10126, #10127, #10132). * Changed - poetry new defaults to "src" layout by default (#10135). - Improve performance of locking dependencies (#10111, #10114, #10138, #10146). - Deprecate adding sources without specifying --priority (#10134). * Fixed - Fix an issue where global options were not handled correctly when positioned after command options (#10021, #10067, #10128). - Fix an issue where building a dependency from source failed because of a conflict between build-system dependencies that were not required for the target environment (#10048). - Fix an issue where poetry init was not able to find a package on PyPI while adding dependencies interactively (#10055). - Fix an issue where the @latest descriptor was incorrectly passed to the core requirement parser (#10069). - Fix an issue where Boolean environment variables set to True (in contrast to true) were interpreted as false (#10080). - Fix an issue where poetry env activate reported a misleading error message (#10087). - Fix an issue where adding an optional dependency with poetry add --optional would not correctly update the lock file (#10076). - Fix an issue where pip was not installed/updated before other dependencies resulting in a race condition (#10102). - Fix an issue where Poetry freezes when multiple threads attempt to unlock the keyring simultaneously (#10062). - Fix an issue where markers with extras were not locked correctly (#10119). - Fix an issue where self-referential extras were not resolved correctly (#10106). - Fix an issue where Poetry could not be run from a zipapp (#10074). - Fix an issue where installation failed with a permission error when using the system environment as a user without write access to system site packages (#9014). - Fix an issue where a version of a dependency that is not compatible with the project's python constraint was locked. (#10141). - Fix an issue where Poetry wrongly reported that the current project's supported Python range is not compatible with some of the required packages Python requirement (#10157). - Fix an issue where the requested extras of a dependency were ignored if the same dependency (with same extras) was specified in multiple groups (#10158). * Docs - Sort commands by name in the CLI reference (#10035). - Add missing documentation for env commands (#10027). - Clarify that the name and version fields are always required if the project section is specified (#10033). - Add a note about restarting the shell for tab completion changes to take effect (#10070). - Fix the example for project.gui-scripts #10121. - Explain how to include files as scripts in the project configuration (#9572, #10133). - Add additional information on specifying required python versions (#10104). - Changes from 2.0.1 * Added - Add support for poetry search in legacy sources (#9949). - Add a message in the poetry source show output when PyPI is implicitly enabled (#9974). * Changed - Improve performance for merging markers from overrides at the end of dependency resolution (#10018). * Fixed - Fix an issue where poetry sync did not remove packages that were not requested (#9946). - Fix an issue where poetry check failed even though there were just warnings and add a --strict option to fail on warnings (#9983). - Fix an issue where poetry update, poetry add and poetry remove with --only uninstalled packages from other groups (#10014). - Fix an issue where poetry update, poetry add and poetry remove uninstalled all extra packages (#10016). - Fix an issue where poetry self update did not recognize Poetry's own environment (#9995). - Fix an issue where read-only system site-packages were not considered when loading an environment with system site-packages (#9942). - Fix an issue where an error message in poetry install started with Warning: instead of Error: (#9945). - Fix an issue where Command.set_poetry, which is used by plugins, was removed (#9981). - Fix an issue where the help text of poetry build --clean showed a malformed short option instead of the description (#9994). * Docs - Add a FAQ entry for the migration from Poetry-specific fields to the project section (#9996). - Fix examples for project.readme and project.urls (#9948). - Add a warning that package sources are a Poetry-specific feature that is not included in core metadata (#9935). - Replace poetry install --sync with poetry sync in the section about synchronizing dependencies (#9944). - Replace poetry shell with poetry env activate in the basic usage section (#9963). - Mention that project.name is always required when the project section is used (#9989). - Fix the constraint of poetry-plugin-export in the section about poetry export (#9954). OBS-URL: https://build.opensuse.org/request/show/1252363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-poetry?expand=0&rev=98
2025-03-12 09:58:03 +00:00
Requires: python-poetry-core = 2.1.1
Requires: (python-build >= 1.2.1 with python-build < 2.0.0)
Requires: (python-cachecontrol >= 0.14.0 with python-cachecontrol < 0.15.0)
# from cachecontrol[filecache]
Requires: python-filelock >= 3.8.0
# /cachecontrol[filecache]
Requires: (python-cleo >= 2.1.0 with python-cleo < 3.0.0)
Requires: (python-dulwich >= 0.22.6 with python-dulwich < 0.23.0)
Requires: (python-fastjsonschema >= 2.18.0 with python-fastjsonschema < 3.0.0)
%if %python_version_nodots < 310
Requires: python-importlib-metadata >= 4.4
%endif
Requires: python-packaging >= 24.0
Requires: (python-installer >= 0.7.0 with python-installer < 0.8.0)
Requires: (python-keyring >= 25.1.0 with python-keyring < 26.0.0)
Requires: (python-pkginfo >= 1.12 with python-pkginfo < 2.0)
- Update to version 1.8.2 * Harden lazy-wheel error handling if the index server is behaving badly in an unexpected way (#9051). * Improve lazy-wheel error handling if the index server does not handle HTTP range requests correctly (#9082). * Improve lazy-wheel error handling if the index server pretends to support HTTP range requests but does not respect them (#9084). * Improve lazy-wheel to allow redirects for HEAD requests (#9087). * Improve debug logging for lazy-wheel errors (#9059). * Fix an issue where the hash of a metadata file could not be calculated correctly due to an encoding issue (#9048). * Fix an issue where poetry add failed in non-package mode if no project name was set (#9046). * Fix an issue where a hint to non-package mode was not compliant with the final name of the setting (#9073). - Release 1.8.1 * Update the minimum required version of packaging (#9031). * Handle unexpected responses from servers that do not support HTTP range requests with negative offsets more robust (#9030). - Release 1.8.0 ## Added * Add a non-package mode for use cases where Poetry is only used for dependency management (#8650). * Add support for PEP 658 to fetch metadata without having to download wheels (#5509). * Add a lazy-wheel config option (default: true) to reduce wheel downloads during dependency resolution (#8815, #8941). * Improve performance of dependency resolution by using shallow copies instead of deep copies (#8671). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-poetry?expand=0&rev=85
2024-03-19 16:17:10 +00:00
Requires: (python-platformdirs >= 3.0.0 with python-platformdirs < 5)
Requires: (python-pyproject-hooks >= 1.0.0 with python-pyproject-hooks < 2.0.0)
Requires: (python-requests >= 2.26 with python-requests < 3.0)
Requires: (python-requests-toolbelt >= 1.0.0 with python-requests-toolbelt < 2.0.0)
Requires: (python-shellingham >= 1.5 with python-shellingham < 2.0)
%if %python_version_nodots < 311
Requires: (python-tomli >= 2.0.1 with python-tomli < 3.0.0)
%endif
Requires: python-trove-classifiers >= 2022.5.19
Requires: (python-findpython >= 0.6.2 with python-findpython < 0.7.0)
Requires: (python-pbs-installer >= 2025.1.6 with python-pbs-installer < 2026.0.0)
Requires: (python-tomlkit >= 0.11.4 with python-tomlkit < 1.0.0)
Requires: (python-virtualenv >= 20.26.6 with python-virtualenv < 21.0.0)
# python-pbs-installer[download,install]
Requires: (python-httpx >= 0.27.0 with python-httpx < 1)
Requires: python-zstandard >= 0.21.0
# /python-pbs-installer[download,install]
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: git-core
Recommends: python-devel
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module cachy >= 0.3.0}
BuildRequires: %{python_module deepdiff >= 6.3}
BuildRequires: %{python_module httpretty >= 1.0}
# Required because deepdiff > 6.2.3
BuildRequires: %{python_module orjson}
BuildRequires: %{python_module poetry = %{version}}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest >= 7.1}
BuildRequires: %{python_module pytest-mock >= 3.9}
BuildRequires: %{python_module pytest-xdist >= 3.1}
BuildRequires: git-core
%endif
%python_subpackages
%description
Python dependency management and packaging made easy.
%prep
%autosetup -p1 -n poetry-%{version}
%if !%{with test}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/poetry
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
# can't install setuptools from PyPI (no network)
donttest="test_uninstall_git_package_nspkg_pth_cleanup or test_builder_setup_generation_runs_with_pip_editable"
donttest="$donttest or test_installer_with_pypi_repository"
# does not find the expected packages in venv
donttest="$donttest or test_executor_should_write_pep610_url_references"
donttest="$donttest or test_prepare_directory or test_prepare_sdist"
donttest="$donttest or test_isolated_env_install_success"
# different hashes in our own ecosystem
donttest="$donttest or test_executor_known_hashes"
# no command "exit-code"
donttest="$donttest or test_info_setup_complex_calls_script"
# we have other packages installed
donttest="$donttest or test_system_site_packages"
# does not raise deprecationwarning
donttest="$donttest or test_get_http_auth"
# requires /tmp to be mounted exec
donttest="$donttest or test_list_poetry_managed or test_find_all_with_poetry_managed"
donttest="$donttest or test_find_poetry_managed_pythons"
%{python_expand # pytest needs to be called from the virtualenv python interpreter gh#python-poetry/poetry#1645
virtualenv-%{$python_bin_suffix} --system-site-packages testenv-%{$python_bin_suffix}
source testenv-%{$python_bin_suffix}/bin/activate
export PYTHONDONTWRITEBYTECODE=1
python -m pytest -v -k "not ($donttest)"
deactivate
}
%endif
%post
%python_install_alternative poetry
%postun
%python_uninstall_alternative poetry
%if !%{with test}
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/poetry
%{python_sitelib}/poetry-%{version}.dist-info
%python_alternative %{_bindir}/poetry
%endif
%changelog