From 2030b70b7f25166ee7f14eacc28728b9988a019d Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 19 Nov 2019 08:54:47 +0100 Subject: [PATCH] only include the pycache files for the built module --- pyp2rpm/templates/epel6.spec | 2 +- pyp2rpm/templates/epel7.spec | 2 +- pyp2rpm/templates/fedora.spec | 2 +- pyp2rpm/templates/mageia.spec | 2 +- pyp2rpm/templates/pld.spec | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyp2rpm/templates/epel6.spec b/pyp2rpm/templates/epel6.spec index b25c3285..1eb89310 100644 --- a/pyp2rpm/templates/epel6.spec +++ b/pyp2rpm/templates/epel6.spec @@ -119,7 +119,7 @@ popd {%- for module in data.py_modules -%} {%- if pv == '3' %} %dir %{python{{ pv }}_sitelib}/__pycache__/ -%{python{{ pv }}_sitelib}/__pycache__/* +%{python{{ pv }}_sitelib}/__pycache__/{{ data.name | module_to_path(module) }}.* {%- endif %} %{python{{ pv }}_sitelib}/{{ data.name | module_to_path(module) }}.py{% if pv != '3'%}*{% endif %} {%- endfor %} diff --git a/pyp2rpm/templates/epel7.spec b/pyp2rpm/templates/epel7.spec index 9c68565a..eb3b95f3 100644 --- a/pyp2rpm/templates/epel7.spec +++ b/pyp2rpm/templates/epel7.spec @@ -87,7 +87,7 @@ rm -rf %{buildroot}%{_bindir}/* {%- for module in data.py_modules -%} {%- if pv == '3' %} %dir %{python{{ pv }}_sitelib}/__pycache__/ -%{python{{ pv }}_sitelib}/__pycache__/* +%{python{{ pv }}_sitelib}/__pycache__/{{ data.name | module_to_path(module) }}.* {%- endif %} %{python{{ pv }}_sitelib}/{{ data.name | module_to_path(module) }}.py{% if pv != '3'%}*{% endif %} {%- endfor %} diff --git a/pyp2rpm/templates/fedora.spec b/pyp2rpm/templates/fedora.spec index 2764e35b..fc9dccad 100644 --- a/pyp2rpm/templates/fedora.spec +++ b/pyp2rpm/templates/fedora.spec @@ -90,7 +90,7 @@ rm -rf %{buildroot}%{_bindir}/* {%- if data.py_modules %} {%- for module in data.py_modules -%} {%- if pv == '3' %} -%{python{{ pv }}_sitelib}/__pycache__/* +%{python{{ pv }}_sitelib}/__pycache__/{{ data.name | module_to_path(module) }}.* {%- endif %} %{python{{ pv }}_sitelib}/{{ data.name | module_to_path(module) }}.py{% if pv != '3'%}*{% endif %} {%- endfor %} diff --git a/pyp2rpm/templates/mageia.spec b/pyp2rpm/templates/mageia.spec index 270568ea..0ffee3db 100644 --- a/pyp2rpm/templates/mageia.spec +++ b/pyp2rpm/templates/mageia.spec @@ -90,7 +90,7 @@ rm -rf %{buildroot}%{_bindir}/* {%- if data.py_modules %} {%- for module in data.py_modules -%} {%- if pv == '3' %} -%{python{{ pv }}_sitelib}/__pycache__/* +%{python{{ pv }}_sitelib}/__pycache__/{{ data.name | module_to_path(module) }}.* {%- endif %} %{python{{ pv }}_sitelib}/{{ data.name | module_to_path(module) }}.py{% if pv != '3'%}*{% endif %} {%- endfor %} diff --git a/pyp2rpm/templates/pld.spec b/pyp2rpm/templates/pld.spec index 95b281a9..f89e17ac 100644 --- a/pyp2rpm/templates/pld.spec +++ b/pyp2rpm/templates/pld.spec @@ -141,7 +141,7 @@ rm -rf $RPM_BUILD_ROOT {%- endif %} {%- if pv == '3' -%} %{py{{ v }}_sitescriptdir}/{{ data.name | module_to_path(module) }}.py -%{py{{ v }}_sitescriptdir}/__pycache__/* +%{py{{ v }}_sitescriptdir}/__pycache__/{{ data.name | module_to_path(module) }}.* {%- endif %} {%- endfor %} {%- endif %}