From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3914B138ADA for ; Thu, 26 Feb 2015 20:44:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95788E08F0; Thu, 26 Feb 2015 20:44:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 345F2E0907 for ; Thu, 26 Feb 2015 20:44:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0444B340BCD for ; Thu, 26 Feb 2015 20:44:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3B258129E1 for ; Thu, 26 Feb 2015 20:44:30 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1424980494.c0a49affccc4ed2ca39bfcc1df7a84bc439ddeeb.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:pending commit in: / X-VCS-Repository: proj/catalyst X-VCS-Files: setup.py X-VCS-Directories: / X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: c0a49affccc4ed2ca39bfcc1df7a84bc439ddeeb X-VCS-Branch: pending Date: Thu, 26 Feb 2015 20:44:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c91b7975-6c4c-4ff6-a8ea-b8d9ec552d90 X-Archives-Hash: 81b83552439e72dfa73421cf01820487 Message-ID: <20150226204430.OCD18w9ZCoNY-Yd-lBWyn4n5Lw1Gor9ByRdcQmw3IMk@z> commit: c0a49affccc4ed2ca39bfcc1df7a84bc439ddeeb Author: Brian Dolbec gentoo org> AuthorDate: Fri Jun 7 14:42:27 2013 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Feb 26 19:54:54 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c0a49aff Streamline data_files generation with additional keys * Move data_file generation out of setup(). * Return per-directory keys, since distutils only uses the directory key and value filename (not the value path) when installing data_files. * Use relative key paths for more flexible installation. * Raise NotImplementedError if os.path.sep is not '/', which allows for simpler path handling. --- setup.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 7a57c54..a412d48 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,14 @@ def _files(prefix, root): yield (install_directory, file_source_paths) +_data_files = [('/etc/catalyst', ['etc/catalyst.conf','etc/catalystrc']), + ('/usr/share/man/man1', ['files/catalyst.1']), + ('/usr/share/man/man5', ['files/catalyst-config.5', 'files/catalyst-spec.5']) + ] +_data_files.extend(_files('livecd', 'lib/catalyst/')) +_data_files.extend(_files('targets', 'lib/catalyst/')) + + _setup( name=_package_name, version=__version__, @@ -69,12 +77,9 @@ _setup( packages=[ _package_name, '{0}.arch'.format(_package_name), + '{0}.base'.format(_package_name), '{0}.targets'.format(_package_name), ], - data_files=list(_itertools.chain( - _files(prefix='/etc/catalyst', root='etc'), - _files(prefix='lib/catalyst/livecd', root='livecd'), - _files(prefix='lib/catalyst/targets', root='targets'), - )), + data_files=_data_files, provides=[_package_name], )