0003-setup.py-drop-path-prefix-from-man-install.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From bc36cba1393120e65bfe4d0f642fd8d38010c0f7 Mon Sep 17 00:00:00 2001
  2. From: Matt Weber <matthew.weber@rockwellcollins.com>
  3. Date: Wed, 28 Nov 2018 20:49:00 -0600
  4. Subject: [PATCH] setup.py: drop path prefix from man install
  5. If the directory is a relative path, it is interpreted relative to the
  6. installation prefix (Python's sys.prefix for pure-Python packages,
  7. sys.exec_prefix for packages that contain extension modules).
  8. So the sys.prefix should not be joined because the correct one will be
  9. added regardless. The reason why a relative path is going to work is
  10. because the installation path is built internally joining python root
  11. with python prefix, thus forming the correct path $(TARGET_DIR)/usr.
  12. (https://docs.python.org/3/distutils/setupscript.html#installing-additional-files)
  13. For this man file install scenario, joining the sys.prefix makes the
  14. path absolute (this was previously working by accident).
  15. Upstream: https://github.com/SELinuxProject/setools/pull/13/commits/bc36cba1393120e65bfe4d0f642fd8d38010c0f7
  16. Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
  17. Cc: Arnout Vandecappelle <arnout@mind.be>
  18. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
  19. ---
  20. setup.py | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. diff --git a/setup.py b/setup.py
  23. index 3767fbc..80e0400 100644
  24. --- a/setup.py
  25. +++ b/setup.py
  26. @@ -136,7 +136,7 @@ setup(name='setools',
  27. cmdclass={'build_qhc': QtHelpCommand, 'clean': CleanCommand},
  28. packages=['setools', 'setools.diff', 'setoolsgui', 'setoolsgui.apol'],
  29. scripts=['apol', 'sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta'],
  30. - data_files=[(join(sys.prefix, 'share/man/man1'), glob.glob("man/*.1"))],
  31. + data_files=[('share/man/man1', glob.glob("man/*.1"))],
  32. package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map']},
  33. ext_modules=cythonize(ext_py_mods, include_path=['setools/policyrep'],
  34. annotate=cython_annotate,
  35. --
  36. 1.9.1