diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-01-05 18:46:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-05 18:46:12 (GMT) |
commit | d36a52ac8133b57c6059b75b9ca2be71450a19b6 (patch) | |
tree | d28ffc2d5caa0b373b91596e66857e099294ea13 | |
parent | 6cebd2000fd026384cf3f1987eb49d15cdc2bfaa (diff) | |
parent | ee327e2cdaad872a6e305028082348f753ac3c42 (diff) | |
download | SCons-d36a52ac8133b57c6059b75b9ca2be71450a19b6.zip SCons-d36a52ac8133b57c6059b75b9ca2be71450a19b6.tar.gz SCons-d36a52ac8133b57c6059b75b9ca2be71450a19b6.tar.bz2 |
Merge pull request #3259 from SCons/rel_3.0.2
Updates from Rel_3.0.2
-rwxr-xr-x[-rw-r--r--] | src/setup.py | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/setup.py b/src/setup.py index c68d566..d189dfc 100644..100755 --- a/src/setup.py +++ b/src/setup.py @@ -20,6 +20,17 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +from __future__ import print_function + + +import distutils.command.build_scripts +import distutils.command.install_scripts +import distutils.command.install_lib +import distutils.command.install_data +import distutils.command.install +import distutils.core +import distutils +# import setuptools """ NOTE: Installed SCons is not importable like usual Python packages. It is executed explicitly with command line scripts. This allows multiple @@ -32,7 +43,6 @@ NOTE: Installed SCons is not importable like usual Python packages. It is below is dedicated to make it happen on various platforms. """ -from __future__ import print_function __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -66,16 +76,6 @@ if not sys.platform == 'win32': else: is_win32 = 1 -import setuptools -import distutils -import distutils.core -import distutils.command.install -import distutils.command.install_data -import distutils.command.install_lib -import distutils.command.install_scripts -import distutils.command.build_scripts -import distutils.msvccompiler - _install = distutils.command.install.install _install_data = distutils.command.install_data.install_data @@ -166,7 +166,7 @@ class install(_install): self.no_scons_script = 0 self.no_version_script = 0 self.install_bat = 0 - self.no_install_bat = not is_win32 + self.no_install_bat = False # not is_win32 self.install_man = 0 self.no_install_man = is_win32 self.standard_lib = 0 @@ -325,9 +325,9 @@ class install_scripts(_install_scripts): base = os.path.basename(src) scons = os.path.join(self.install_dir, base) scons_ver = scons + '-' + Version - if is_win32: - scons += '.py' - scons_ver += '.py' + if sys.platform == "win32": + scons = scons + '.py' + scons_ver = scons_ver + '.py' create_version_script(src, scons_ver) create_basename_script(src, scons, scons_ver) @@ -355,7 +355,8 @@ class install_scripts(_install_scripts): # Use symbolic versions of permissions so this script doesn't fail to parse under python3.x exec_and_read_permission = stat.S_IXOTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IROTH | stat.S_IRUSR | stat.S_IRGRP mode_mask = 4095 # Octal 07777 used because python3 has different octal syntax than python 2 - mode = ((os.stat(file)[stat.ST_MODE]) | exec_and_read_permission) & mode_mask + mode = ((os.stat(file)[stat.ST_MODE]) | + exec_and_read_permission) & mode_mask # log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) # --- /distutils copy/paste --- @@ -504,7 +505,7 @@ arguments = { 'install_lib': install_lib, 'install_data': install_data, 'install_scripts': install_scripts, - 'build_scripts': build_scripts} + 'build_scripts': build_scripts}, } distutils.core.setup(**arguments) |