Skip to content

Commit

Permalink
Code review: 322370043: Changed to setup.py to exclude non-script fil…
Browse files Browse the repository at this point in the history
…es from bdist_rpm #1299
  • Loading branch information
joachimmetz committed Aug 5, 2017
1 parent c30895c commit f85a3a7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/dpkg/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plaso (20170805-1) unstable; urgency=low

* Auto-generated

-- Log2Timeline <[email protected]> Sat, 05 Aug 2017 07:42:55 +0200
-- Log2Timeline <[email protected]> Sat, 05 Aug 2017 07:45:56 +0200
25 changes: 23 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,29 @@ def _make_spec_file(self):
in_description = True

elif line.startswith('%files'):
line = '%files -f INSTALLED_FILES -n {0:s}-%{{name}}'.format(
python_package)
# Cannot use %{_libdir} here since it can expand to "lib64".
lines = [
'%files',
'%defattr(644,root,root,755)',
'%doc ACKNOWLEDGEMENTS AUTHORS LICENSE README',
'%{_prefix}/bin/*.py',
'%{_prefix}/lib/python*/site-packages/plaso/*.py',
'%{_prefix}/lib/python*/site-packages/plaso/*/*.py',
'%{_prefix}/lib/python*/site-packages/plaso/*/*/*.py',
'%{_prefix}/lib/python*/site-packages/plaso*.egg-info/*',
'%{_prefix}/share/plaso/*',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*.pyc',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*.pyo',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/__pycache__/*',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*/*.pyc',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*/*.pyo',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*/__pycache__/*',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*/*/*.pyc',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*/*/*.pyo',
'%exclude %{_prefix}/lib/python*/site-packages/plaso/*/*/__pycache__/*']

python_spec_file.extend(lines)
break

elif line.startswith('%prep'):
in_description = False
Expand Down

0 comments on commit f85a3a7

Please sign in to comment.