From ee327e2cdaad872a6e305028082348f753ac3c42 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Thu, 3 Jan 2019 19:37:10 -0800 Subject: Remove setuptools as it changes the contents of the .tar.gz and skips including CHANGES.txt and other .txt files --- src/setup.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) mode change 100644 => 100755 src/setup.py diff --git a/src/setup.py b/src/setup.py old mode 100644 new mode 100755 index c68d566..d189dfc --- 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) -- cgit v0.12