2022-01-24 00:11:46 +01:00
|
|
|
#
|
2024-02-29 10:04:45 +01:00
|
|
|
# spec file for package python-pdm
|
2022-01-24 00:11:46 +01:00
|
|
|
#
|
2024-01-05 18:46:24 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2022-01-24 00:11:46 +01: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-06-15 03:55:32 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
2022-08-17 18:37:18 +02:00
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
2022-06-15 03:55:32 +02:00
|
|
|
%bcond_without test
|
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-06-19 16:04:06 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-06-15 03:55:32 +02:00
|
|
|
Name: python-pdm%{psuffix}
|
2024-02-29 10:04:45 +01:00
|
|
|
Version: 2.12.4
|
2022-01-24 00:11:46 +01:00
|
|
|
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
|
2022-06-20 02:43:13 +02:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2023-06-23 13:30:12 +02:00
|
|
|
BuildRequires: %{python_module importlib-metadata if %python-base <= 3.9}
|
2023-06-19 16:04:06 +02:00
|
|
|
BuildRequires: %{python_module pdm-backend}
|
2022-08-17 18:37:18 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2022-01-24 00:11:46 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2022-01-24 00:45:49 +01:00
|
|
|
Requires: python-blinker
|
2022-08-17 18:37:18 +02:00
|
|
|
Requires: python-cachecontrol >= 0.12.11
|
|
|
|
Requires: python-certifi
|
2024-02-29 10:04:45 +01:00
|
|
|
Requires: python-dep-logic
|
2023-12-13 04:00:32 +01:00
|
|
|
Requires: python-findpython >= 0.4
|
2023-04-04 11:38:11 +02:00
|
|
|
Requires: python-installer
|
2022-08-17 18:37:18 +02:00
|
|
|
Requires: python-packaging >= 20.9
|
2023-06-19 16:04:06 +02:00
|
|
|
Requires: python-pdm-backend
|
2022-01-24 00:45:49 +01:00
|
|
|
Requires: python-platformdirs
|
2022-12-20 18:59:50 +01:00
|
|
|
Requires: python-pyproject-hooks
|
2022-01-24 00:45:49 +01:00
|
|
|
Requires: python-python-dotenv >= 0.15
|
2022-08-17 18:37:18 +02:00
|
|
|
Requires: python-requests-toolbelt
|
2023-12-13 04:00:32 +01:00
|
|
|
Requires: python-resolvelib >= 1.0.1
|
2022-08-17 18:37:18 +02:00
|
|
|
Requires: python-rich >= 12.3.0
|
2022-01-24 00:45:49 +01:00
|
|
|
Requires: python-shellingham >= 1.3.2
|
2023-12-13 04:00:32 +01:00
|
|
|
Requires: python-unearth >= 0.12.1
|
2022-08-17 18:37:18 +02:00
|
|
|
Requires: python-virtualenv >= 20
|
2023-12-13 04:00:32 +01:00
|
|
|
Requires: (python-tomlkit >= 0.11.1 with python-tomlkit < 1)
|
2022-08-17 18:37:18 +02:00
|
|
|
# from python-cachecontrol[filecache]
|
|
|
|
Requires: python-lockfile >= 0.9
|
|
|
|
%if 0%{?python_version_nodots} < 311
|
2022-01-24 00:45:49 +01:00
|
|
|
Requires: python-tomli >= 1.1.0
|
2022-08-17 18:37:18 +02:00
|
|
|
%endif
|
2023-06-23 13:30:12 +02:00
|
|
|
%if 0%{?python_version_nodots} <= 39
|
2022-08-17 18:37:18 +02:00
|
|
|
Requires: python-importlib-metadata
|
|
|
|
Requires: python-typing-extensions
|
|
|
|
%endif
|
2023-12-13 04:00:32 +01:00
|
|
|
%if 0%{?python_version_nodots} >= 310
|
|
|
|
Requires: python-truststore
|
|
|
|
%endif
|
2022-01-24 00:45:49 +01:00
|
|
|
Requires(post): update-alternatives
|
2024-02-29 10:04:45 +01:00
|
|
|
Requires(postun): update-alternatives
|
2022-01-24 00:11:46 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
2022-06-15 03:55:32 +02:00
|
|
|
%if %{with test}
|
2022-06-20 02:43:13 +02:00
|
|
|
BuildRequires: %{python_module pdm = %{version}}
|
2023-06-19 16:04:06 +02:00
|
|
|
BuildRequires: %{python_module pytest-httpserver}
|
2022-01-24 00:11:46 +01:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
2022-01-24 00:45:49 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-06-15 03:55:32 +02:00
|
|
|
%endif
|
2022-01-24 00:11:46 +01:00
|
|
|
# /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
|
2022-06-15 03:55:32 +02:00
|
|
|
%autosetup -p1 -n pdm-%{version}
|
2022-08-17 18:37:18 +02:00
|
|
|
# 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
|
2022-01-24 00:11:46 +01:00
|
|
|
|
|
|
|
%build
|
2022-06-15 03:55:32 +02:00
|
|
|
%if !%{with test}
|
2022-01-24 00:11:46 +01:00
|
|
|
%pyproject_wheel
|
2022-06-15 03:55:32 +02:00
|
|
|
%endif
|
2022-01-24 00:11:46 +01:00
|
|
|
|
|
|
|
%install
|
2022-06-15 03:55:32 +02:00
|
|
|
%if !%{with test}
|
2022-01-24 00:11:46 +01:00
|
|
|
%pyproject_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pdm
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2022-06-15 03:55:32 +02:00
|
|
|
%endif
|
2022-01-24 00:11:46 +01:00
|
|
|
|
2022-08-17 18:37:18 +02:00
|
|
|
%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"
|
2022-10-05 11:58:05 +02:00
|
|
|
donttest="$donttest or test_init_non_interactive"
|
2023-04-04 11:38:11 +02:00
|
|
|
|
|
|
|
# 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"
|
2023-12-13 04:00:32 +01:00
|
|
|
# Requires network
|
|
|
|
donttest="$donttest or test_build_with_no_isolation"
|
2023-04-04 11:38:11 +02:00
|
|
|
%pytest -v -k "not ($donttest)"
|
2022-08-17 18:37:18 +02:00
|
|
|
%endif
|
|
|
|
|
2022-01-24 00:11:46 +01:00
|
|
|
%post
|
|
|
|
%python_install_alternative pdm
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pdm
|
|
|
|
|
2022-06-15 03:55:32 +02:00
|
|
|
%if !%{with test}
|
2022-01-24 00:11:46 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/pdm
|
2022-08-17 18:37:18 +02:00
|
|
|
%{python_sitelib}/pdm
|
|
|
|
%{python_sitelib}/pdm-%{version}*-info
|
2022-06-15 03:55:32 +02:00
|
|
|
%endif
|
2022-01-24 00:11:46 +01:00
|
|
|
|
|
|
|
%changelog
|