2017-09-08 18:26:41 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-jsbeautifier
|
|
|
|
|
#
|
2025-02-14 14:03:07 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2017-09-08 18:26:41 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-04 13:35:38 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
2017-09-08 18:26:41 +00:00
|
|
|
|
|
|
|
|
|
2025-02-14 14:03:07 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-09-08 18:26:41 +00:00
|
|
|
Name: python-jsbeautifier
|
2025-12-08 11:41:21 +00:00
|
|
|
Version: 1.15.4
|
2017-09-08 18:26:41 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: JavaScript unobfuscator and beautifier
|
2018-12-04 13:35:38 +00:00
|
|
|
License: MIT
|
2020-03-03 12:10:13 +00:00
|
|
|
URL: https://jsbeautifier.org
|
2019-05-22 19:03:12 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/j/jsbeautifier/jsbeautifier-%{version}.tar.gz
|
|
|
|
|
# https://github.com/beautify-web/js-beautify/issues/1674
|
|
|
|
|
Source1: https://raw.githubusercontent.com/beautify-web/js-beautify/master/LICENSE
|
2025-02-14 14:03:07 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2017-09-08 18:26:41 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-02-14 14:03:07 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-09-11 13:29:57 +00:00
|
|
|
BuildRequires: fdupes
|
2018-12-04 13:35:38 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-03-03 12:10:13 +00:00
|
|
|
Requires: python-EditorConfig >= 0.12.2
|
|
|
|
|
Requires: python-six >= 1.13.0
|
2020-05-25 13:31:36 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-03-18 20:32:40 +00:00
|
|
|
Requires(postun): update-alternatives
|
2019-09-11 13:29:57 +00:00
|
|
|
BuildArch: noarch
|
2019-05-22 19:03:12 +00:00
|
|
|
# SECTION test requirements
|
2020-03-03 12:10:13 +00:00
|
|
|
BuildRequires: %{python_module EditorConfig >= 0.12.2}
|
2017-09-08 18:26:41 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-03-03 12:10:13 +00:00
|
|
|
BuildRequires: %{python_module six >= 1.13.0}
|
2019-05-22 19:03:12 +00:00
|
|
|
# /SECTION
|
2017-09-08 18:26:41 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Beautify, unpack or deobfuscate JavaScript. Handles popular online obfuscators.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n jsbeautifier-%{version}
|
2019-05-22 19:03:12 +00:00
|
|
|
cp %{SOURCE1} .
|
2017-09-08 18:26:41 +00:00
|
|
|
|
|
|
|
|
%build
|
2025-02-14 14:03:07 +00:00
|
|
|
%pyproject_wheel
|
2017-09-08 18:26:41 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-02-14 14:03:07 +00:00
|
|
|
%pyproject_install
|
2020-05-25 13:31:36 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/js-beautify
|
2019-05-22 19:03:12 +00:00
|
|
|
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
|
2017-09-08 18:26:41 +00:00
|
|
|
|
|
|
|
|
%check
|
2020-03-03 12:10:13 +00:00
|
|
|
%pytest jsbeautifier/tests/testindentation.py
|
|
|
|
|
%pytest jsbeautifier/tests/generated/tests.py
|
2017-09-08 18:26:41 +00:00
|
|
|
|
2020-05-25 13:31:36 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative js-beautify
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative js-beautify
|
|
|
|
|
|
2017-09-08 18:26:41 +00:00
|
|
|
%files %{python_files}
|
2019-05-22 19:03:12 +00:00
|
|
|
%license LICENSE
|
2020-05-25 13:31:36 +00:00
|
|
|
%python_alternative %{_bindir}/js-beautify
|
2017-09-08 18:26:41 +00:00
|
|
|
%{python_sitelib}/jsbeautifier
|
2025-02-14 14:03:07 +00:00
|
|
|
%{python_sitelib}/jsbeautifier-%{version}.dist-info
|
2017-09-08 18:26:41 +00:00
|
|
|
|
|
|
|
|
%changelog
|