From 41e9e4f0516ce0c2650aa34e17c0c84088b311d31b0f67e00ee58d19fbcdfe63 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 1 Mar 2024 05:33:35 +0000 Subject: [PATCH] - Switch to autosetup and pyproject macros. - No more greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjsparser?expand=0&rev=11 --- python-pyjsparser.changes | 6 ++++++ python-pyjsparser.spec | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/python-pyjsparser.changes b/python-pyjsparser.changes index 20cf301..f91961c 100644 --- a/python-pyjsparser.changes +++ b/python-pyjsparser.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 1 05:33:06 UTC 2024 - Steve Kowalik + +- Switch to autosetup and pyproject macros. +- No more greedy globs in %files. + ------------------------------------------------------------------- Fri Apr 21 12:30:56 UTC 2023 - Dirk Müller diff --git a/python-pyjsparser.spec b/python-pyjsparser.spec index 56da8e3..d63fd79 100644 --- a/python-pyjsparser.spec +++ b/python-pyjsparser.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyjsparser # -# Copyright (c) 2023 SUSE LLC +# 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 @@ -16,19 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?sle15_python_module_pythons} Name: python-pyjsparser Version: 2.7.1 Release: 0 Summary: Javascript parser based on esprimajs License: MIT -Group: Development/Languages/Python URL: https://github.com/PiotrDabkowski/pyjsparser Source: https://files.pythonhosted.org/packages/source/p/pyjsparser/pyjsparser-%{version}.tar.gz Source1: https://raw.githubusercontent.com/PiotrDabkowski/pyjsparser/master/LICENSE Patch0: fix_version.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -39,20 +39,20 @@ A JavaScript parser - a manual translation of esprima.js to Python. It supports the whole of ECMAScript 5.1 and parts of ECMAScript 6. %prep -%setup -q -n pyjsparser-%{version} -%patch0 -p1 +%autosetup -p1 -n pyjsparser-%{version} cp %{SOURCE1} . %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %files %{python_files} %license LICENSE %doc README.md -%{python_sitelib}/* +%{python_sitelib}/pyjsparser +%{python_sitelib}/pyjsparser-%{version}.dist-info %changelog