From 8865f5ec0e28375943e316b0258db3763ffc3b34 Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Fri, 2 Jan 2026 18:29:00 +0200 Subject: [PATCH 1/3] Update SPEC file for pyproject builds Signed-off-by: Plamen Dimitrov --- python-aexpect.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python-aexpect.spec b/python-aexpect.spec index 0e72551..955ef09 100644 --- a/python-aexpect.spec +++ b/python-aexpect.spec @@ -60,10 +60,11 @@ sftp, telnet, among others. %endif %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files aexpect ln -s aexpect_helper %{buildroot}%{_bindir}/aexpect_helper-%{python3_pkgversion} ln -s aexpect_helper %{buildroot}%{_bindir}/aexpect_helper-%{python3_version} @@ -72,11 +73,9 @@ ln -s aexpect_helper %{buildroot}%{_bindir}/aexpect_helper-%{python3_version} selftests/checkall %endif -%files -n python3-aexpect +%files -n python3-aexpect -f %{pyproject_files} %license LICENSE %doc README.rst -%{python3_sitelib}/aexpect/ -%{python3_sitelib}/aexpect-%{version}-py%{python3_version}.egg-info/ %{_bindir}/aexpect_helper* %changelog From 93a6d56f3d3db68e232ba4692028a69bc2c3572c Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Fri, 2 Jan 2026 18:37:31 +0200 Subject: [PATCH 2/3] Specify a valid license field for PEP 621 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RPM builds with the previous configuration bring to ValueError: invalid pyproject.toml config: `project.license`. configuration error: `project.license` must be valid exactly by one definition (2 matches found): - keys: 'file': {type: string} required: ['file'] - keys: 'text': {type: string} required: ['text'] error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output. Signed-off-by: Plamen Dimitrov --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 68e396b..3975c3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "aexpect" description = "Python library used to control interactive programs" readme = "README.rst" dynamic = ["version"] -license = "GPL-2.0-or-later" +license = {text = "GPL-2.0-or-later"} authors = [{name = "Aexpect developers", email = "avocado-devel@redhat.com"}] maintainers = [{name = "Aexpect developers", email = "avocado-devel@redhat.com"}] requires-python = ">=3.8" From 262b9a8bc20b063af2dd61b5ff94553ffc08e889 Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Fri, 2 Jan 2026 19:14:23 +0200 Subject: [PATCH 3/3] Use a fixed pyproject version to make rpm builds and others easier The RPM spec file already contains a fixed or non-dynamic version so having a dynamic version for the pyproject.toml doesn't bring any benefit. Exporting env variables to force such a version is complicated when mixed with the isolated bash environments for the separate stages and sed-ing the pyproject file is invasive and might not work with all autosetup magic. Signed-off-by: Plamen Dimitrov --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3975c3d..085928f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "aexpect" description = "Python library used to control interactive programs" readme = "README.rst" -dynamic = ["version"] +version = "1.8.0" license = {text = "GPL-2.0-or-later"} authors = [{name = "Aexpect developers", email = "avocado-devel@redhat.com"}] maintainers = [{name = "Aexpect developers", email = "avocado-devel@redhat.com"}]