Daniel Garcia
22537479fe
* Don't validate local file requirements that are not used. (#3376) * Don't set "dependencies" as empty list for uv toml if there is no dependencies in the raw toml file. (#3378) * Add a dummy project name to the script environment pyproject.toml. (#3382) - 2.22.2 * Write installer metadata like INSTALLER and REQUESTED to dist-info directory when installing packages. (#3359) * Respect .python-version file in the project root directory when selecting the Python interpreter. By default, it will be written when running pdm use command. (#3367) * Fix a problem of missing dependencies when adding to dev dependencies if both editable and non-editable dependencies exist. (#3361) * Use stdlib for URL <-> Path conversions. (#3362) * shellingham.detect_shell() returns ('tcsh', '/bin/tcsh') for tcsh on FreeBSD, so the current code tries to use the Bash venv activation script and fails due to syntax error. This change fixes the issue. (#3366) * Fix a performance issue because pypi source credentials were being queried many times from keyring. (#3368) - 2.22.1 * Fix zsh hanging issue by removing PyPI package completion. (#3329) * Write dev dependencies to dependency-groups section when importing project from other package managers. (#3354) - 2.22.0 * Use minimal template if the project is an application. (#3295) * Add one safe_compatible version specifiers saving strategy. (#3301) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pdm?expand=0&rev=49
173 lines
6.2 KiB
RPMSpec
173 lines
6.2 KiB
RPMSpec
#
|
|
# spec file for package python-pdm
|
|
#
|
|
# Copyright (c) 2025 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/
|
|
#
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "test"
|
|
%define psuffix -test
|
|
%bcond_without test
|
|
%endif
|
|
%if "%{flavor}" == ""
|
|
%define psuffix %{nil}
|
|
%bcond_with test
|
|
%endif
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-pdm%{psuffix}
|
|
Version: 2.22.3
|
|
Release: 0
|
|
Summary: Python Development Master
|
|
License: MIT
|
|
URL: https://github.com/pdm-project/pdm/
|
|
Source0: https://files.pythonhosted.org/packages/source/p/pdm/pdm-%{version}.tar.gz
|
|
BuildRequires: %{python_module base >= 3.9}
|
|
BuildRequires: %{python_module importlib-metadata if %python-base <= 3.9}
|
|
BuildRequires: %{python_module pdm-backend}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-blinker
|
|
Requires: python-certifi
|
|
Requires: python-dep-logic >= 0.4.4
|
|
Requires: python-filelock >= 3.13
|
|
Requires: python-findpython >= 0.6
|
|
Requires: python-hishel >= 0.0.24
|
|
Requires: python-httpcore
|
|
Requires: python-httpx >= 0.20
|
|
Requires: python-installer >= 0.7
|
|
Requires: python-msgpack >= 1.0
|
|
Requires: python-packaging >= 20.9
|
|
Requires: python-pbs-installer >= 2024.4.18
|
|
Requires: python-platformdirs
|
|
Requires: python-pyproject-hooks
|
|
Requires: python-python-dotenv >= 0.15
|
|
Requires: python-resolvelib >= 1.0.1
|
|
Requires: python-rich >= 12.3.0
|
|
Requires: python-shellingham >= 1.3.2
|
|
Requires: python-unearth >= 0.17.0
|
|
Requires: python-virtualenv >= 20
|
|
Requires: (python-tomlkit >= 0.11.1 with python-tomlkit < 1)
|
|
%if 0%{?python_version_nodots} < 311
|
|
Requires: python-tomli >= 1.1.0
|
|
%endif
|
|
%if 0%{?python_version_nodots} <= 39
|
|
Requires: python-importlib-metadata
|
|
Requires: python-typing-extensions
|
|
%endif
|
|
%if 0%{?python_version_nodots} >= 310
|
|
Requires: python-truststore
|
|
%endif
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
# SECTION test requirements
|
|
%if %{with test}
|
|
BuildRequires: %{python_module pdm = %{version}}
|
|
BuildRequires: %{python_module pytest-httpserver}
|
|
BuildRequires: %{python_module pytest-mock}
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
BuildRequires: %{python_module pytest}
|
|
%endif
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
PDM is a modern Python package manager with PEP 582 support. It
|
|
installs and manages packages in a similar way to npm that
|
|
doesn't need to create a virtualenv at all!
|
|
|
|
%prep
|
|
%autosetup -p1 -n pdm-%{version}
|
|
# we don't care about certifi version, the distro package replaces the certificates with system ones anyway
|
|
sed -i 's/"certifi>=[0-9.]*"/"certifi"/' pyproject.toml
|
|
find . -name ".gitignore" -print -delete
|
|
|
|
%build
|
|
%if !%{with test}
|
|
%pyproject_wheel
|
|
%endif
|
|
|
|
%install
|
|
%if !%{with test}
|
|
%pyproject_install
|
|
%python_clone -a %{buildroot}%{_bindir}/pdm
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%endif
|
|
|
|
%if %{with test}
|
|
%check
|
|
# no network
|
|
donttest="network"
|
|
# mock testing finds the wrong python versions in our multiflavor setup
|
|
donttest="$donttest or test_project_packages_path or test_conda_backend_create"
|
|
donttest="$donttest or test_init_non_interactive"
|
|
|
|
# Broken test trying to find a resolution to a git repository
|
|
donttest="$donttest or test_add_editable_package or test_non_editable_override_editable"
|
|
# Broken test unable to find a resolution for wheel
|
|
donttest="$donttest or test_list_dependency_graph_include_exclude or test_list_csv_include_exclude_valid"
|
|
# Unable to find a resolution for setuptools
|
|
donttest="$donttest or test_list_csv_include_exclude or test_remove_editable_packages_while_keeping_normal or test_project_backend"
|
|
# Requires network
|
|
donttest="$donttest or test_build_with_no_isolation"
|
|
# Requires network
|
|
donttest="$donttest or test_find_candidates_from_find_links"
|
|
donttest="$donttest or test_build_single_module"
|
|
donttest="$donttest or test_build_single_module_with_readme"
|
|
donttest="$donttest or test_build_package"
|
|
donttest="$donttest or test_build_src_package"
|
|
donttest="$donttest or test_build_package_include"
|
|
donttest="$donttest or test_build_src_package_by_include"
|
|
donttest="$donttest or test_build_with_config_settings"
|
|
donttest="$donttest or test_cli_build_with_config_settings"
|
|
donttest="$donttest or test_build_ignoring_pip_environment"
|
|
donttest="$donttest or test_find_interpreters_with_PDM_IGNORE_ACTIVE_VENV"
|
|
donttest="$donttest or test_hooks[build] or test_hooks[publish]"
|
|
donttest="$donttest or test_skip_option_from_signal"
|
|
donttest="$donttest or test_skip_all_option_from_signal"
|
|
donttest="$donttest or test_skip_pre_post_option_from_signal"
|
|
donttest="$donttest or test_build_distributions"
|
|
donttest="$donttest or test_show_self_package"
|
|
donttest="$donttest or test_publish_and_build_in_one_run"
|
|
donttest="$donttest or test_expand_project_root_in_url"
|
|
donttest="$donttest or test_init_validate_python_requires"
|
|
donttest="$donttest or test_init_command"
|
|
donttest="$donttest or test_init_command_library"
|
|
donttest="$donttest or test_use_command"
|
|
donttest="$donttest or test_init_project_respect_version_file"
|
|
donttest="$donttest or test_resolve_local_artifacts or test_resolve_two_extras_from_the_same_package or test_resolve_file_req_with_prerelease"
|
|
donttest="$donttest or test_init_auto_create_venv"
|
|
|
|
%pytest -v -k "not ($donttest)"
|
|
%endif
|
|
|
|
%post
|
|
%python_install_alternative pdm
|
|
|
|
%postun
|
|
%python_uninstall_alternative pdm
|
|
|
|
%if !%{with test}
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/pdm
|
|
%{python_sitelib}/pdm
|
|
%{python_sitelib}/pdm-%{version}*-info
|
|
%endif
|
|
|
|
%changelog
|