Accepting request 1101457 from devel:languages:python

- Stop using greedy globs in %files.
- Switch to %pytest from invoke.
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/request/show/1101457
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pscript?expand=0&rev=9
This commit is contained in:
Yuchen Lin 2023-07-31 13:24:47 +00:00 committed by Git OBS Bridge
commit 02f05c4669
2 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jul 31 06:13:34 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <yarunachalam@suse.com> Tue Oct 4 23:20:51 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-pscript # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,7 +16,6 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname pscript %define modname pscript
Name: python-pscript Name: python-pscript
Version: 0.7.7 Version: 0.7.7
@ -25,12 +24,13 @@ Summary: Python to JavaScript compiler
License: BSD-2-Clause License: BSD-2-Clause
URL: https://github.com/flexxui/pscript URL: https://github.com/flexxui/pscript
Source: https://github.com/flexxui/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz Source: https://github.com/flexxui/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildArch: noarch BuildArch: noarch
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module invoke}
BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: nodejs 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. of Python that this compiler supports.
%prep %prep
%setup -q -n %{modname}-%{version} %autosetup -p1 -n %{modname}-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
# the tests actually do not invoke themselves %pytest pscript/tests
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} invoke-%{$python_bin_suffix} test --unit
%files %{python_files} %files %{python_files}
%doc README.md %doc README.md
%license LICENSE %license LICENSE
%{python_sitelib}/* %{python_sitelib}/pscript
%{python_sitelib}/pscript_legacy
%{python_sitelib}/pscript-%{version}.dist-info
%changelog %changelog