From d075a0be5e80b0a5bfd7bf726ecd7fc91513be5cf30487582872f0212c0c7f27 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 27 Feb 2025 11:16:48 +0000 Subject: [PATCH] - Add %{?sle15_python_module_pythons} OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-hatch-jupyter-builder?expand=0&rev=10 --- .gitattributes | 23 ++++++++ .gitignore | 1 + hatch-test-nonisolated.patch | 25 +++++++++ hatch_jupyter_builder-0.9.1.tar.gz | 3 ++ python-hatch-jupyter-builder.changes | 29 ++++++++++ python-hatch-jupyter-builder.spec | 81 ++++++++++++++++++++++++++++ 6 files changed, 162 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 hatch-test-nonisolated.patch create mode 100644 hatch_jupyter_builder-0.9.1.tar.gz create mode 100644 python-hatch-jupyter-builder.changes create mode 100644 python-hatch-jupyter-builder.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/hatch-test-nonisolated.patch b/hatch-test-nonisolated.patch new file mode 100644 index 0000000..8d13868 --- /dev/null +++ b/hatch-test-nonisolated.patch @@ -0,0 +1,25 @@ +Index: hatch_jupyter_builder-0.8.2/tests/test_plugin.py +=================================================================== +--- hatch_jupyter_builder-0.8.2.orig/tests/test_plugin.py ++++ hatch_jupyter_builder-0.8.2/tests/test_plugin.py +@@ -100,7 +100,8 @@ dependencies = ["hatch-jupyter-builder@f + + @pytest.mark.skipif(platform.python_implementation() == "PyPy", reason="Does not work on PyPy") + def test_hatch_build(tmp_path): +- venv.create(tmp_path, with_pip=True) ++ # openSUSE tests: use the system build dependencies ++ venv.create(tmp_path, with_pip=True, system_site_packages=True) + if os.name == "nt": + python = Path(tmp_path) / "Scripts/python.exe" + else: +@@ -113,6 +114,7 @@ def test_hatch_build(tmp_path): + # Handle running min version test. + if "PIP_CONSTRAINT" in env: + del env["PIP_CONSTRAINT"] +- subprocess.check_call([python, "-m", "pip", "install", "build"], cwd=tmp_path, env=env) +- +- subprocess.check_call([python, "-m", "build", "--sdist", "."], cwd=tmp_path, env=env) ++ subprocess.check_call([python, "-m", "build", ++ "--no-isolation", # openSUSE tests: use the system build dependencies ++ "--sdist", "."], ++ cwd=tmp_path, env=env) diff --git a/hatch_jupyter_builder-0.9.1.tar.gz b/hatch_jupyter_builder-0.9.1.tar.gz new file mode 100644 index 0000000..5fd73de --- /dev/null +++ b/hatch_jupyter_builder-0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79278198d124c646b799c5e8dca8504aed9dcaaa88d071a09eb0b5c2009a58ad +size 55953 diff --git a/python-hatch-jupyter-builder.changes b/python-hatch-jupyter-builder.changes new file mode 100644 index 0000000..ecaf140 --- /dev/null +++ b/python-hatch-jupyter-builder.changes @@ -0,0 +1,29 @@ +------------------------------------------------------------------- +Thu Feb 27 11:09:49 UTC 2025 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu Mar 28 19:30:05 UTC 2024 - Ben Greiner + +- Update to 0.9.1 + * Use tomllib from the Python 3.11+ standard library #108 (@hroncok) +- Release 0.9.0 + * Update index.rst #139 (@agoose77) + * Migration script fixes #138 (@akx) + * Maintenance and upkeep improvements + +------------------------------------------------------------------- +Sun Apr 23 21:09:46 UTC 2023 - Ben Greiner + +- Update to 0.8.3 + * Use local coverage #114 (@blink1073) + * Add more linting #106 (@blink1073) + * Fix test typing #104 (@blink1073) + * Add more ci checks #102 (@blink1073) + +------------------------------------------------------------------- +Sun Dec 25 20:55:15 UTC 2022 - Ben Greiner + +- Initial specfile for v0.8.2 +- Required by jupyter-server 2 diff --git a/python-hatch-jupyter-builder.spec b/python-hatch-jupyter-builder.spec new file mode 100644 index 0000000..abb9ee2 --- /dev/null +++ b/python-hatch-jupyter-builder.spec @@ -0,0 +1,81 @@ +# +# spec file for package python-hatch-jupyter-builder +# +# Copyright (c) 2024 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/ +# + + +# This is with alts/libalternatives only and has never been something else +%bcond_without libalternatives +%{?sle15_python_module_pythons} +Name: python-hatch-jupyter-builder +Version: 0.9.1 +Release: 0 +Summary: A hatch plugin to help build Jupyter packages +License: BSD-3-Clause +URL: https://github.com/jupyterlab/hatch-jupyter-builder +Source: https://files.pythonhosted.org/packages/source/h/hatch_jupyter_builder/hatch_jupyter_builder-%{version}.tar.gz +# PATCH-FIX-OPENSUSE hatch-test-nonisolated.patch code@bnavigator.de +Patch1: hatch-test-nonisolated.patch +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module hatchling >= 1.17} +BuildRequires: %{python_module pip} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-hatchling >= 1.17 +Provides: python-hatch_jupyter_builder = %{version}-%{release} +BuildArch: noarch +# SECTION test +BuildRequires: %{python_module build} +BuildRequires: %{python_module hatch} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module tomli} +# /SECTION +%python_subpackages + +%description +This provides a build hook plugin for Hatch that +adds a build step for use with Jupyter packages. + +%prep +%autosetup -p1 -n hatch_jupyter_builder-%{version} +sed -i 's/"--color=yes", //' pyproject.toml + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/hatch-jupyter-builder +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%post +%python_install_alternative hatch-jupyter-builder + +%postun +%python_uninstall_alternative hatch-jupyter-builder + +%files %{python_files} +%license LICENSE.txt +%python_alternative %{_bindir}/hatch-jupyter-builder +%{python_sitelib}/hatch_jupyter_builder +%{python_sitelib}/hatch_jupyter_builder-%{version}.dist-info + +%changelog