diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-05-08 20:06:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-08 20:06:18 +0200 |
commit | 8b0d575823ca6a0a36c20952220b9beec6664b20 (patch) | |
tree | d5ae17447793afa0b9e2e079e6ae6baa9f8989e2 | |
parent | 87666d105a2d172ebb46d96969be68a0e5aae490 (diff) | |
parent | 76d0b833e38da70d81dc45271ad3ff77272be327 (diff) | |
download | meson-8b0d575823ca6a0a36c20952220b9beec6664b20.zip meson-8b0d575823ca6a0a36c20952220b9beec6664b20.tar.gz meson-8b0d575823ca6a0a36c20952220b9beec6664b20.tar.bz2 |
Merge pull request #1705 from floppym/install-shebang2
setup.py: install scripts from build_dir
-rw-r--r-- | authors.txt | 1 | ||||
-rw-r--r-- | setup.py | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/authors.txt b/authors.txt index 1cfcad7..8a02848 100644 --- a/authors.txt +++ b/authors.txt @@ -84,3 +84,4 @@ Michael Olbrich Ernestas Kulik Thomas Hindoe Paaboel Andersen Paolo Borelli +Mike Gilbert @@ -16,8 +16,6 @@ import os import sys -from distutils.dir_util import mkpath -from distutils.file_util import copy_file from mesonbuild.coredata import version @@ -41,16 +39,20 @@ class install_scripts(orig): super().run() return + if not self.skip_build: + self.run_command('build_scripts') self.outfiles = [] if not self.dry_run: - mkpath(self.install_dir) + self.mkpath(self.install_dir) # We want the files to be installed without a suffix on Unix for infile in self.get_inputs(): + infile = os.path.basename(infile) + in_built = os.path.join(self.build_dir, infile) in_stripped = infile[:-3] if infile.endswith('.py') else infile outfile = os.path.join(self.install_dir, in_stripped) # NOTE: Mode is preserved by default - copy_file(infile, outfile, dry_run=self.dry_run) + self.copy_file(in_built, outfile) self.outfiles.append(outfile) setup(name='meson', |