2017-09-08 18:26:41 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-jsbeautifier
|
|
|
|
|
#
|
2023-12-07 22:02:31 +00:00
|
|
|
# Copyright (c) 2023 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
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
|
Name: python-jsbeautifier
|
2023-12-07 22:02:31 +00:00
|
|
|
Version: 1.14.11
|
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
|
2017-09-08 18:26:41 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
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
|
2019-09-11 13:29:57 +00:00
|
|
|
Requires: python-setuptools
|
2020-03-03 12:10:13 +00:00
|
|
|
Requires: python-six >= 1.13.0
|
2020-05-25 13:31:36 +00:00
|
|
|
Requires(post): update-alternatives
|
2022-09-29 19:03:42 +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
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_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
|
|
|
|
|
%{python_sitelib}/jsbeautifier-%{version}-py*.egg-info
|
|
|
|
|
|
|
|
|
|
%changelog
|