From: "Lewis" Received: from [74.96.34.245] (account lgrosenthal@2rosenthals.com HELO [192.168.201.140]) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTPSA id 4952595 for gnuports@2rosenthals.com; Fri, 30 Sep 2022 23:28:00 -0400 Subject: Re: [GNU Ports] Assertion error with pip building To: GNU Ports for eCS Mailing List References: Message-ID: <6337B3BF.1020901@2rosenthals.com> Date: Fri, 30 Sep 2022 23:27:59 -0400 User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:38.0) Gecko/20100101 Firefox/38.0 SeaMonkey/2.35 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Steve... On 09/30/22 10:35 pm, Steven Levine wrote: > In , on 09/30/22 > at 10:18 PM, "Lewis G Rosenthal" said: > > HI Lewis, > >> I've hackishly worked around the problem by removing line 91 from >> python3.9/site-packages/setuptools/command/install_lib.py: >> assert preserve_mode and preserve_times and not preserve_symlinks > Rather than removing the line, I recommend inserting a few lines to print > the values of preserve_mode, preserve_times and preserve_symlinks. This > should tell you which variable has the unexpected value. > > To my eyes, it seems odd that copy_tree is being called with > preserve_symlinks=1 given what the assertion says. > Hmmm... That is interesting, isn't it? I need to track that back to its source. Obviously, install_lib.py is only following what it's been given, and as such, the assertion is indeed false. For the sake of completeness, the actual routine (line 91 restored) in install_lib.py is: -- def copy_tree( self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1 ): assert preserve_mode and preserve_times and not preserve_symlinks exclude = self.get_exclusions() if not exclude: return orig.install_lib.copy_tree(self, infile, outfile) # Exclude namespace package __init__.py* files from the output from setuptools.archive_util import unpack_directory from distutils import log outfiles = [] def pf(src, dst): if dst in exclude: log.warn("Skipping installation of %s (namespace package)", dst) return False log.info("copying %s -> %s", src, os.path.dirname(dst)) outfiles.append(dst) return dst unpack_directory(infile, outfile, pf) return outfiles