5 Commits

2 changed files with 24 additions and 14 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 9 14:41:21 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Tue Jun 3 11:12:29 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Mar 21 15:24:57 UTC 2023 - Dirk Müller <dmueller@suse.com> Tue Mar 21 15:24:57 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-phply # spec file for package python-phply
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2025 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,7 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without libalternatives
Name: python-phply Name: python-phply
Version: 1.2.6 Version: 1.2.6
Release: 0 Release: 0
@@ -25,14 +25,16 @@ License: BSD-3-Clause
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/viraptor/phply URL: https://github.com/viraptor/phply
Source: https://files.pythonhosted.org/packages/source/p/phply/phply-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/phply/phply-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module ply} BuildRequires: %{python_module ply}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-ply Requires: python-ply
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -43,10 +45,10 @@ phply is a parser for the PHP programming language written using PLY, a Lex/YACC
%autosetup -p1 -n phply-%{version} %autosetup -p1 -n phply-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/phpparse %python_clone -a %{buildroot}%{_bindir}/phpparse
%python_clone -a %{buildroot}%{_bindir}/phplex %python_clone -a %{buildroot}%{_bindir}/phplex
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -55,19 +57,17 @@ phply is a parser for the PHP programming language written using PLY, a Lex/YACC
%check %check
%pytest %pytest
%post %pre
%python_install_alternative phpparse %python_libalternatives_reset_alternative phpparse
%python_install_alternative phplex %python_libalternatives_reset_alternative phplex
%postun
%python_uninstall_alternative phpparse
%python_uninstall_alternative phplex
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc README.md %doc README.md
%python_alternative %{_bindir}/phplex %python_alternative %{_bindir}/phplex
%python_alternative %{_bindir}/phpparse %python_alternative %{_bindir}/phpparse
%{python_sitelib}/* %{python_sitelib}/phply
%{python_sitelib}/phply-%{version}*-info
%{python_sitelib}/phply-%{version}*nspkg.pth
%changelog %changelog