forked from pool/python-Js2Py
- Run tests
- Add patches: * remove-python-six.patch, to remove python-six dependency * python312.patch, to make it compatible with python312 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Js2Py?expand=0&rev=21
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-Js2Py
|
||||
#
|
||||
# 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,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-Js2Py
|
||||
Version: 0.74
|
||||
@@ -27,11 +26,15 @@ Group: Development/Languages/Python
|
||||
URL: https://github.com/PiotrDabkowski/Js2Py
|
||||
Source: https://files.pythonhosted.org/packages/source/J/Js2Py/Js2Py-%{version}.tar.gz
|
||||
Source1: https://raw.githubusercontent.com/PiotrDabkowski/Js2Py/master/LICENSE.md
|
||||
# PATCH-FIX-OPENSUSE remove-python-six.patch
|
||||
Patch0: remove-python-six.patch
|
||||
# PATCH-FIX-UPSTREAM python312.patch gh#PiotrDabkowski/Js2Py#327
|
||||
Patch1: python312.patch
|
||||
BuildRequires: %{python_module pyjsparser}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-pyjsparser
|
||||
Requires: python-six
|
||||
Requires: python-tzlocal
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
@@ -42,7 +45,7 @@ execute virtually any JavaScript code. Js2Py, basically an
|
||||
implementation of the JavaScript core, is written in pure Python.
|
||||
|
||||
%prep
|
||||
%setup -q -n Js2Py-%{version}
|
||||
%autosetup -p1 -n Js2Py-%{version}
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
@@ -52,11 +55,18 @@ cp %{SOURCE1} .
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
# no tests in pypi sdist and no tags in github repo (https://github.com/PiotrDabkowski/Js2Py/issues/100)
|
||||
%check
|
||||
pushd tests
|
||||
touch node_failed.txt
|
||||
%{python_expand #
|
||||
PYTHONPATH=%{buildroot}%{$python_sitelib} $python run.py
|
||||
}
|
||||
popd
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE.md
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/js2py
|
||||
%{python_sitelib}/Js2Py-%{version}*-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user