Sync from SUSE:ALP:Source:Standard:1.0 python-pip-run revision b5a691a9587acf4f54535fd7d6f083b5

This commit is contained in:
Adrian Schröter 2023-06-06 15:13:58 +02:00
commit ea22a5ce27
8 changed files with 221 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

BIN
path-16.4.0-py3-none-any.whl (Stored with Git LFS) Normal file

Binary file not shown.

BIN
path.py-12.5.0-py3-none-any.whl (Stored with Git LFS) Normal file

Binary file not shown.

BIN
pip-run-8.8.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
Index: pip-run-8.8.1/pip_run/tests/test_scripts.py
===================================================================
--- pip-run-8.8.1.orig/pip_run/tests/test_scripts.py
+++ pip-run-8.8.1/pip_run/tests/test_scripts.py
@@ -4,7 +4,6 @@ import sys
import subprocess
import pytest
-import nbformat
from pip_run import scripts
@@ -85,6 +84,8 @@ class TestSourceDepsReader:
class TestNotebookDepsReader:
@pytest.fixture
def notebook_factory(self, tmpdir, request):
+ nbformat = pytest.importorskip("nbformat")
+
class Factory:
def __init__(self):
self.nb = nbformat.v4.new_notebook()

29
python-pip-run.changes Normal file
View File

@ -0,0 +1,29 @@
-------------------------------------------------------------------
Fri Apr 21 12:29:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Tue Apr 18 23:00:49 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Switch to single spec version build for PSP
-------------------------------------------------------------------
Tue Dec 6 04:22:58 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to version v8.8.2
* Packaging refresh.
* Merge https://github.com/jaraco/skeleton
-------------------------------------------------------------------
Fri Aug 5 09:14:48 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Add pip-run-suse-ring1-no-nbformat.patch for removal of nbformat
from Ring1 (pip-run will be in Ring1 for setuptools:test)
-------------------------------------------------------------------
Wed Jul 13 14:27:22 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Initial specfile for v8.8.1
- Required by setuptools 63 test suite
- Tests use wheels for path and path.py for testing -- not packaged

136
python-pip-run.spec Normal file
View File

@ -0,0 +1,136 @@
#
# spec file
#
# 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/
#
%{?sle15_python_module_pythons}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
# Disables installing nbformat for tests in Ring1 (see also Patch1)
%bcond_with ringdisabled
%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400
%bcond_without ringdisabled
%endif
Name: python-pip-run%{psuffix}
Version: 8.8.2
Release: 0
Summary: Install packages and run Python with them
License: MIT
URL: https://github.com/jaraco/pip-run
Source: https://files.pythonhosted.org/packages/source/p/pip-run/pip-run-%{version}.tar.gz
# Needs the wheels for path and path.py for testing
Source10: https://files.pythonhosted.org/packages/py3/p/path.py/path.py-12.5.0-py3-none-any.whl
Source11: https://files.pythonhosted.org/packages/py3/p/path/path-16.4.0-py3-none-any.whl
# PATCH-FEATURE-OPENSUSE pip-run-suse-ring1-no-nbformat.patch code@bnavigator.de -- Don't test with nbformat if not available
Patch1: pip-run-suse-ring1-no-nbformat.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 56}
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-autocommand
Requires: python-packaging
Requires: python-path >= 15.1
Requires: python-pip >= 19.3
Requires(post): update-alternatives
Requires(postun):update-alternatives
%if 0%{?python_version_nodots} < 38
Requires: python-importlib-metadata
%endif
%if %{with test}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module pip-run = %{version}}
BuildRequires: %{python_module pytest >= 6}
BuildRequires: ca-certificates
%if %{without ringdisabled}
BuildRequires: %{python_module nbformat}
%endif
%endif
BuildArch: noarch
%python_subpackages
%description
On-demand temporary package installation for a single interpreter run.
pip-run is not intended to solve production dependency management,
but does aim to address the other, one-off scenarios around dependency management
- trials and experiments
- build setup
- test runners
- just in time script running
- interactive development
- bug triage
pip-run is a compliment to Pip and Virtualenv and Setuptools, intended to more
readily address the on-demand needs.
%prep
%autosetup -p1 -n pip-run-%{version}
%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400
sed -i -e '/nbformat/d' setup.cfg
%endif
%if !%{with test}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pip-run
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
mkdir -p wheels
cp %{SOURCE10} %{SOURCE11} wheels/
export PIP_FIND_LINKS=$PWD/wheels/
dont_test=""
%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400
dont_test+=""
%endif
%pytest -k "$dont_test"
%endif
%post
%python_install_alternative pip-run
%postun
%python_uninstall_alternative pip-run
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.rst CHANGES.rst
%python_alternative %{_bindir}/pip-run
%{python_sitelib}/pip-run.py*
%pycache_only %{python_sitelib}/__pycache__/pip-run*.pyc
%{python_sitelib}/pip_run
%{python_sitelib}/pip_run-%{version}*-info
%endif
%changelog