diff --git a/micropython.spec b/micropython.spec index db97f12..79bd7f0 100644 --- a/micropython.spec +++ b/micropython.spec @@ -46,7 +46,6 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -%python_subpackages %description A lean and efficient Python implementation for microcontrollers and constrained systems @@ -80,9 +79,11 @@ install -d %{buildroot}%{_bindir} install -t %{buildroot}%{_bindir} ports/unix/build-standard/micropython pushd tools/mpremote %pyproject_install -%python3_fix_shebang -%fdupes %{buildroot}%{python3_sitelib} popd +%python3_fix_shebang +%python_expand %fdupes %{buildroot}%{$python_sitelib} +# remove pycache to get rid of rpmlint "W: python-bytecode-inconsistent-mtime" warnings +%python_expand rm -rf %{buildroot}%{$python_sitelib}/mpremote/__pycache__ %check %ifnarch x86_64 @@ -99,11 +100,11 @@ make -C ports/unix PYTHON=%{_bindir}/python%python_version V=1 test %doc docs/unix/* %{_bindir}/micropython -%files -n mpremote %{python_files} +%files -n mpremote %license tools/mpremote/LICENSE %doc tools/mpremote/README.md -%{python_sitelib}/mpremote -%{python_sitelib}/mpremote-%{version}.dist-info +%{_prefix}/lib/python%{python_version}/site-packages/mpremote +%{_prefix}/lib/python%{python_version}/site-packages/mpremote-%{version}.dist-info %{_bindir}/mpremote %changelog