From f2461f0469ed2f6f37a4d38338c6e9192427781e2ea5dc1c9faa77b3dfccaef6 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 31 Jul 2023 06:13:56 +0000 Subject: [PATCH] - Stop using greedy globs in %files. - Switch to %pytest from invoke. - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pscript?expand=0&rev=18 --- python-pscript.changes | 7 +++++++ python-pscript.spec | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/python-pscript.changes b/python-pscript.changes index 9f92bc0..5c88124 100644 --- a/python-pscript.changes +++ b/python-pscript.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 31 06:13:34 UTC 2023 - Steve Kowalik + +- Stop using greedy globs in %files. +- Switch to %pytest from invoke. +- Switch to pyproject macros. + ------------------------------------------------------------------- Tue Oct 4 23:20:51 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-pscript.spec b/python-pscript.spec index 53c0c54..5f682a1 100644 --- a/python-pscript.spec +++ b/python-pscript.spec @@ -1,7 +1,7 @@ # # spec file for package python-pscript # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define modname pscript Name: python-pscript Version: 0.7.7 @@ -25,12 +24,13 @@ Summary: Python to JavaScript compiler License: BSD-2-Clause URL: https://github.com/flexxui/pscript Source: https://github.com/flexxui/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module invoke} BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest} BuildRequires: nodejs @@ -42,22 +42,23 @@ PScript is a Python to JavaScript compiler, and is also the name of the subset of Python that this compiler supports. %prep -%setup -q -n %{modname}-%{version} +%autosetup -p1 -n %{modname}-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# the tests actually do not invoke themselves -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} invoke-%{$python_bin_suffix} test --unit +%pytest pscript/tests %files %{python_files} %doc README.md %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/pscript +%{python_sitelib}/pscript_legacy +%{python_sitelib}/pscript-%{version}.dist-info %changelog