1 |
commit: f8b2a44f38c35fd7ee0854cd12a85e8b314de676 |
2 |
Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 22 15:34:47 2011 +0000 |
4 |
Commit: Paweł Hajdan, Jr. <phajdan.jr <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 22 15:34:47 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/chromium-tools.git;a=commit;h=f8b2a44f |
7 |
|
8 |
Move chromium-depot-tool to libexec, to avoid cluttering $PATH. |
9 |
|
10 |
--- |
11 |
MANIFEST.in | 4 +++ |
12 |
chromium-depot-tool => scripts/chromium-depot-tool | 0 |
13 |
v8-create-tarball => scripts/v8-create-tarball | 0 |
14 |
v8-extract-version => scripts/v8-extract-version | 0 |
15 |
setup.py | 28 +++++++++---------- |
16 |
5 files changed, 17 insertions(+), 15 deletions(-) |
17 |
|
18 |
diff --git a/MANIFEST.in b/MANIFEST.in |
19 |
new file mode 100644 |
20 |
index 0000000..9ecf870 |
21 |
--- /dev/null |
22 |
+++ b/MANIFEST.in |
23 |
@@ -0,0 +1,4 @@ |
24 |
+global-include *.py |
25 |
+global-exclude *.pyc *.pyo |
26 |
+graft scripts |
27 |
+include LICENSE |
28 |
|
29 |
diff --git a/chromium-depot-tool b/scripts/chromium-depot-tool |
30 |
similarity index 100% |
31 |
rename from chromium-depot-tool |
32 |
rename to scripts/chromium-depot-tool |
33 |
|
34 |
diff --git a/v8-create-tarball b/scripts/v8-create-tarball |
35 |
similarity index 100% |
36 |
rename from v8-create-tarball |
37 |
rename to scripts/v8-create-tarball |
38 |
|
39 |
diff --git a/v8-extract-version b/scripts/v8-extract-version |
40 |
similarity index 100% |
41 |
rename from v8-extract-version |
42 |
rename to scripts/v8-extract-version |
43 |
|
44 |
diff --git a/setup.py b/setup.py |
45 |
index 2c1b88d..09abc3a 100644 |
46 |
--- a/setup.py |
47 |
+++ b/setup.py |
48 |
@@ -3,6 +3,7 @@ import subprocess |
49 |
import sys |
50 |
|
51 |
from distutils.command.install_scripts import install_scripts |
52 |
+from distutils.command.install_data import install_data |
53 |
from distutils.command.sdist import sdist |
54 |
from distutils.core import setup |
55 |
from distutils.errors import * |
56 |
@@ -46,21 +47,16 @@ class my_sdist(sdist): |
57 |
sdist.make_release_tree(self, base_dir, files) |
58 |
open(os.path.join(base_dir, 'VERSION'), 'w').write(get_version_from_git()) |
59 |
|
60 |
-class my_install_scripts(install_scripts): |
61 |
- def __symlink(self, src, dst): |
62 |
- dest_name, _ = self.copy_file( |
63 |
- src, |
64 |
- os.path.join(self.install_dir, dst), |
65 |
- link='sym') |
66 |
- self.outfiles.append(dest_name) |
67 |
- |
68 |
+class my_install_data(install_data): |
69 |
def run(self): |
70 |
- install_scripts.run(self) |
71 |
- self.__symlink('chromium-depot-tool', 'drover') |
72 |
- self.__symlink('chromium-depot-tool', 'gcl') |
73 |
- self.__symlink('chromium-depot-tool', 'gclient') |
74 |
+ install_data.run(self) |
75 |
+ for tool in ['drover', 'gcl', 'gclient']: |
76 |
+ os.symlink( |
77 |
+ os.path.join('..', 'libexec', 'chromium-depot-tool'), |
78 |
+ os.path.join(self.install_dir, 'bin', tool)) |
79 |
|
80 |
-scripts = ["v8-extract-version"] |
81 |
+scripts = ["scripts/v8-extract-version"] |
82 |
+data_files = [] |
83 |
|
84 |
cmdclass = {'sdist': my_sdist} |
85 |
|
86 |
@@ -68,14 +64,16 @@ args = sys.argv[1:] |
87 |
|
88 |
enable_subversion = get_option(args, 'subversion', default=True) |
89 |
if enable_subversion: |
90 |
- scripts += ["chromium-depot-tool", "v8-create-tarball"] |
91 |
- cmdclass['install_scripts'] = my_install_scripts |
92 |
+ scripts += ["scripts/v8-create-tarball"] |
93 |
+ data_files += [["libexec", ["scripts/chromium-depot-tool"]]] |
94 |
+ cmdclass['install_data'] = my_install_data |
95 |
|
96 |
setup( |
97 |
name="chromium-tools", |
98 |
version=get_version(), |
99 |
py_modules=["chromium_tools"], |
100 |
scripts=scripts, |
101 |
+ data_files=data_files, |
102 |
cmdclass=cmdclass, |
103 |
script_args=args |
104 |
) |