From 13b947e228fb17bed2883e1317c68d954f57ecace150a7b7d4a5474311b81b2d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 10 Nov 2022 12:07:33 +0000 Subject: [PATCH] Clean up SPEC file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-platformio?expand=0&rev=18 --- python-platformio.spec | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/python-platformio.spec b/python-platformio.spec index 656b3a1..70bf3e5 100644 --- a/python-platformio.spec +++ b/python-platformio.spec @@ -16,17 +16,17 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-platformio Version: 6.1.5 Release: 0 Summary: New Generation Ecosystem for Embedded Development License: Apache-2.0 Group: Development/Languages/Python -URL: https://platformio.org +URL: https://github.com/platformio/platformio-core Source: https://files.pythonhosted.org/packages/source/p/platformio/platformio-%{version}.tar.gz -BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -61,11 +61,14 @@ who write applications for embedded products. %setup -q -n platformio-%{version} %build -%python_build +%pyproject_wheel %install -%python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%pyproject_install +# mv because of https://community.platformio.org/t/installs-scripts-directory-to-the-global-namespace/30396 +%{python_expand mv %{buildroot}%{$python_sitelib}/scripts %{buildroot}%{$python_sitelib}/platformio +%fdupes %{buildroot}%{$python_sitelib} +} %python_clone -a %{buildroot}%{_bindir}/pio %python_clone -a %{buildroot}%{_bindir}/piodebuggdb @@ -81,6 +84,7 @@ who write applications for embedded products. %python_alternative %{_bindir}/pio %python_alternative %{_bindir}/piodebuggdb %python_alternative %{_bindir}/platformio -%{python_sitelib}/* +%{python_sitelib}/platformio +%{python_sitelib}/platformio-%{version}*-info %changelog