From a885c17bc341b8e623e9a7bffca5cfc0dd690c9e Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 15 Mar 2017 14:43:28 +0100 Subject: [PATCH] setup.py: Install share/... files to ${prefix}/share/... (issue #94) --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index b2f4bad..d9ae498 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,12 @@ here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md')) as f: long_description = '\n' + f.read() +def _data_files(path): + for root, dirs, files in os.walk(path): + if not files: + continue + yield (root, [os.path.join(root, f) for f in files]) + setuptools.setup( name="safeeyes", version="1.1.9", @@ -31,6 +37,8 @@ setuptools.setup( 'config/lang/*.json', 'glade/*.glade', 'resource/*']}, + data_files=list(_data_files( + os.path.join(os.path.dirname(__file__), 'share'))), install_requires=requires, entry_points={'console_scripts': ['safeeyes = safeeyes.safeeyes:main']}, keywords='linux utility health eye-strain safe-eyes',