diff setup.py @ 6524:f961dbbc3573

issue2551167 roundup issues when using pip install Running pip install generates a wheel install. This places locale, template and man pages under site-packages/usr/share/.... These changes make roundup look there for templates (affecting admin.py) and locale (affecting i18n.py) files. This also makes it work better in virtual environment and containers (docker). There is also a commented out bit of code in setup.py that prevents it from making a bdist_wheel forcing a regular install with files put under /usr/locale etc. This can be re-enabled if needed for 2.2 if there are still issues with roundup that aren't solved by then.
author John Rouillard <rouilj@ieee.org>
date Sun, 07 Nov 2021 01:49:03 -0400
parents cbc18a8bc61f
children 2e568d6f72a4
line wrap: on
line diff
--- a/setup.py	Sat Nov 06 15:29:24 2021 -0400
+++ b/setup.py	Sun Nov 07 01:49:03 2021 -0400
@@ -216,6 +216,16 @@
           data_files=data_files)
 
 if __name__ == '__main__':
+
+    # Prevent `pip install roundup` from building bdist_wheel.
+    # Man pages, templates, locales installed under site-packages not
+    #  in normal system locations.
+    # https://stackoverflow.com/questions/36846260/can-python-setuptools-install-files-outside-dist-packages
+    '''
+    if 'bdist_wheel' in sys.argv:
+        raise RuntimeError("This setup.py does not support wheels")
+    '''
+
     os.chdir(os.path.dirname(__file__) or '.')
     main()
 

Roundup Issue Tracker: http://roundup-tracker.org/