From 5329754443146e0eca750669d99b0bc450a8f0c55b1933ebe58e215c2565ea64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 9 Jun 2025 08:53:35 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-j2gen?expand=0&rev=11 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + j2gen-0.1.0.tar.gz | 3 ++ python-j2gen.changes | 36 +++++++++++++++++++++ python-j2gen.spec | 76 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 139 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 j2gen-0.1.0.tar.gz create mode 100644 python-j2gen.changes create mode 100644 python-j2gen.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/j2gen-0.1.0.tar.gz b/j2gen-0.1.0.tar.gz new file mode 100644 index 0000000..ce068e8 --- /dev/null +++ b/j2gen-0.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3205ee960660b5d7140341014e7cf7c1552af54de81645e312e0c8605cc8965b +size 8931 diff --git a/python-j2gen.changes b/python-j2gen.changes new file mode 100644 index 0000000..3b8de10 --- /dev/null +++ b/python-j2gen.changes @@ -0,0 +1,36 @@ +------------------------------------------------------------------- +Mon Jun 9 08:52:50 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Fri May 30 08:35:58 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Wed Nov 3 08:08:50 UTC 2021 - pgajdos@suse.com + +- %check: use %pyunittest rpm macro + +------------------------------------------------------------------- +Mon May 25 10:59:31 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Mon Sep 30 08:26:37 UTC 2019 - Thomas Bechtold + +- update to 0.1.0: +* Error out when template variables are not defined + +------------------------------------------------------------------- +Fri Sep 27 07:48:59 UTC 2019 - Tomáš Chvátal + +- Format with spec-cleaner +- Do not pull in devel python module as it is not needed + +------------------------------------------------------------------- +Fri Sep 27 03:41:03 UTC 2019 - Thomas Bechtold + +- Initial packaging (version 0.0.1) diff --git a/python-j2gen.spec b/python-j2gen.spec new file mode 100644 index 0000000..1c0960e --- /dev/null +++ b/python-j2gen.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-j2gen +# +# 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/ +# + + +%bcond_without libalternatives +Name: python-j2gen +Version: 0.1.0 +Release: 0 +Summary: Jinja2 template renderer with yaml input files +License: Apache-2.0 +Group: Development/Languages/Python +URL: https://github.com/toabctl/j2gen +Source: https://files.pythonhosted.org/packages/source/j/j2gen/j2gen-%{version}.tar.gz +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-Jinja2 +Requires: python-PyYAML +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Jinja2} +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module ddt} +BuildRequires: %{python_module flake8} +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +Jinja2 template renderer with yaml input files + +%prep +%setup -q -n j2gen-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/j2gen +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest discover -v + +%pre +# removing old update-alternatives entries +%python_libalternatives_reset_alternative j2gen + +%files %{python_files} +%doc AUTHORS ChangeLog README.rst +%license LICENSE +%python_alternative %{_bindir}/j2gen +%{python_sitelib}/j2gen +%{python_sitelib}/j2gen-%{version}*-info + +%changelog