summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Hajdan, Jr <phajdan.jr@gentoo.org>2011-02-22 16:34:47 +0100
committerPawel Hajdan, Jr <phajdan.jr@gentoo.org>2011-02-22 16:34:47 +0100
commitf8b2a44f38c35fd7ee0854cd12a85e8b314de676 (patch)
treeb3cae3c7daa527db13b9d1517efa43f8399cf6ff
parentDouble-check version.cc when creating the tarball. (diff)
downloadchromium-tools-f8b2a44f38c35fd7ee0854cd12a85e8b314de676.tar.gz
chromium-tools-f8b2a44f38c35fd7ee0854cd12a85e8b314de676.tar.bz2
chromium-tools-f8b2a44f38c35fd7ee0854cd12a85e8b314de676.zip
Move chromium-depot-tool to libexec, to avoid cluttering $PATH.
-rw-r--r--MANIFEST.in4
-rwxr-xr-xscripts/chromium-depot-tool (renamed from chromium-depot-tool)0
-rwxr-xr-xscripts/v8-create-tarball (renamed from v8-create-tarball)0
-rwxr-xr-xscripts/v8-extract-version (renamed from v8-extract-version)0
-rw-r--r--setup.py28
5 files changed, 17 insertions, 15 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..9ecf870
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,4 @@
+global-include *.py
+global-exclude *.pyc *.pyo
+graft scripts
+include LICENSE
diff --git a/chromium-depot-tool b/scripts/chromium-depot-tool
index e5de0ee..e5de0ee 100755
--- a/chromium-depot-tool
+++ b/scripts/chromium-depot-tool
diff --git a/v8-create-tarball b/scripts/v8-create-tarball
index 8306819..8306819 100755
--- a/v8-create-tarball
+++ b/scripts/v8-create-tarball
diff --git a/v8-extract-version b/scripts/v8-extract-version
index 277df29..277df29 100755
--- a/v8-extract-version
+++ b/scripts/v8-extract-version
diff --git a/setup.py b/setup.py
index 2c1b88d..09abc3a 100644
--- a/setup.py
+++ b/setup.py
@@ -3,6 +3,7 @@ import subprocess
import sys
from distutils.command.install_scripts import install_scripts
+from distutils.command.install_data import install_data
from distutils.command.sdist import sdist
from distutils.core import setup
from distutils.errors import *
@@ -46,21 +47,16 @@ class my_sdist(sdist):
sdist.make_release_tree(self, base_dir, files)
open(os.path.join(base_dir, 'VERSION'), 'w').write(get_version_from_git())
-class my_install_scripts(install_scripts):
- def __symlink(self, src, dst):
- dest_name, _ = self.copy_file(
- src,
- os.path.join(self.install_dir, dst),
- link='sym')
- self.outfiles.append(dest_name)
-
+class my_install_data(install_data):
def run(self):
- install_scripts.run(self)
- self.__symlink('chromium-depot-tool', 'drover')
- self.__symlink('chromium-depot-tool', 'gcl')
- self.__symlink('chromium-depot-tool', 'gclient')
+ install_data.run(self)
+ for tool in ['drover', 'gcl', 'gclient']:
+ os.symlink(
+ os.path.join('..', 'libexec', 'chromium-depot-tool'),
+ os.path.join(self.install_dir, 'bin', tool))
-scripts = ["v8-extract-version"]
+scripts = ["scripts/v8-extract-version"]
+data_files = []
cmdclass = {'sdist': my_sdist}
@@ -68,14 +64,16 @@ args = sys.argv[1:]
enable_subversion = get_option(args, 'subversion', default=True)
if enable_subversion:
- scripts += ["chromium-depot-tool", "v8-create-tarball"]
- cmdclass['install_scripts'] = my_install_scripts
+ scripts += ["scripts/v8-create-tarball"]
+ data_files += [["libexec", ["scripts/chromium-depot-tool"]]]
+ cmdclass['install_data'] = my_install_data
setup(
name="chromium-tools",
version=get_version(),
py_modules=["chromium_tools"],
scripts=scripts,
+ data_files=data_files,
cmdclass=cmdclass,
script_args=args
)