1 |
commit: c0a49affccc4ed2ca39bfcc1df7a84bc439ddeeb |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 7 14:42:27 2013 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 26 19:54:54 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c0a49aff |
7 |
|
8 |
Streamline data_files generation with additional keys |
9 |
|
10 |
* Move data_file generation out of setup(). |
11 |
* Return per-directory keys, since distutils only uses the directory |
12 |
key and value filename (not the value path) when installing |
13 |
data_files. |
14 |
* Use relative key paths for more flexible installation. |
15 |
* Raise NotImplementedError if os.path.sep is not '/', which allows |
16 |
for simpler path handling. |
17 |
|
18 |
--- |
19 |
setup.py | 15 ++++++++++----- |
20 |
1 file changed, 10 insertions(+), 5 deletions(-) |
21 |
|
22 |
diff --git a/setup.py b/setup.py |
23 |
index 7a57c54..a412d48 100644 |
24 |
--- a/setup.py |
25 |
+++ b/setup.py |
26 |
@@ -41,6 +41,14 @@ def _files(prefix, root): |
27 |
yield (install_directory, file_source_paths) |
28 |
|
29 |
|
30 |
+_data_files = [('/etc/catalyst', ['etc/catalyst.conf','etc/catalystrc']), |
31 |
+ ('/usr/share/man/man1', ['files/catalyst.1']), |
32 |
+ ('/usr/share/man/man5', ['files/catalyst-config.5', 'files/catalyst-spec.5']) |
33 |
+ ] |
34 |
+_data_files.extend(_files('livecd', 'lib/catalyst/')) |
35 |
+_data_files.extend(_files('targets', 'lib/catalyst/')) |
36 |
+ |
37 |
+ |
38 |
_setup( |
39 |
name=_package_name, |
40 |
version=__version__, |
41 |
@@ -69,12 +77,9 @@ _setup( |
42 |
packages=[ |
43 |
_package_name, |
44 |
'{0}.arch'.format(_package_name), |
45 |
+ '{0}.base'.format(_package_name), |
46 |
'{0}.targets'.format(_package_name), |
47 |
], |
48 |
- data_files=list(_itertools.chain( |
49 |
- _files(prefix='/etc/catalyst', root='etc'), |
50 |
- _files(prefix='lib/catalyst/livecd', root='livecd'), |
51 |
- _files(prefix='lib/catalyst/targets', root='targets'), |
52 |
- )), |
53 |
+ data_files=_data_files, |
54 |
provides=[_package_name], |
55 |
) |