Re: Python3 problem under Solaris
Rob Boehne <[email protected]> Tue, 26 Nov 2019 13:39:17 +0000
| Newsgroups | gmane.comp.programming.tools.scons.devel |
|---|---|
| Message-ID | <[email protected]> |
I’ll test with python 2.7 and put up a PR today. Thanks! From: Scons-dev <[email protected]> on behalf of Bill Deegan <[email protected]> Reply-To: SCons developer list <[email protected]> Date: Monday, November 25, 2019 at 5:23 PM To: SCons developer list <[email protected]> Subject: Re: [Scons-dev] Python3 problem under Solaris Rob, If you can double check that works with python 2.7 then I'll make the change and it'll be in the next release. Unless you'd like to submit a pull request https://github.com/SCons/scons/wiki/GitWorkflows<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSCons%2Fscons%2Fwiki%2FGitWorkflows&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858580246&sdata=4IQqHxJkQV%2Fh4QnLOxlRR26B1I4aJDN%2FmZOTA2mqFOg%3D&reserved=0> -Bill On Mon, Nov 25, 2019 at 2:34 PM Rob Boehne <[email protected]<mailto:[email protected]>> wrote: I’m porting to SPARC Solaris a project that uses Scons in Python3 – (we use it widely on Sparc & Intel Solaris with python 2.7) and I’m seeing what appears to be a Python3 porting problem when an Environment object is created: (python-env-lhasa) robb@lhasa:/devlocal/robb/apdfl-18box/pdfl18_all/DevTests (sparc_stuff)$ scons BUILD_64_BIT=true STAGE=Debug TESTS=smoke scons: Reading SConscript files ... Building for Debug TypeError: cannot use a string pattern on a bytes-like object: File "/devlocal/robb/apdfl-18box/pdfl18_all/DevTests/SConstruct", line 538: OS_LEVEL='') File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Environment.py", line 992: apply_tools(self, tools, toolpath) File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Environment.py", line 107: env.Tool(tool) File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Environment.py", line 1799: tool(self) File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/__init__.py", line 303: self.generate(env, *args, **kw) File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/default.py", line 40: for t in SCons.Tool.tool_list(env['PLATFORM'], env): File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/__init__.py", line 1288: cxx_compiler = FindTool(cxx_compilers, env) or cxx_compilers[0] File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/__init__.py", line 1174: if t.exists(env): File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/suncxx.py", line 139: path, cxx, shcxx, version = get_cppc(env) File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/suncxx.py", line 115: path, version = get_package_info(package, pkginfo, pkgchk) File "/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool/suncxx.py", line 79: version_match = version_re.search(pkginfo_contents) (python-env-lhasa) robb@lhasa:/devlocal/robb/apdfl-18box/pdfl18_all/DevTests (sparc_stuff)$ I corrected this by specifying encoding=’utf-8’ to the two subprocess.Popen() calls in SCons/Tool/suncxx.py And I *think* that should be fine for Python 2.7 as well. I haven’t done any SCons development in a long while, but here is a diff. It should be fairly obvious if this is the right fix. (python-env-lhasa) robb@lhasa:/devlocal/robb/apdfl-18box/python-env-lhasa/lib/python3.7/site-packages/scons/SCons/Tool (develop-18)$ diff -u suncxx.py~ suncxx.py --- suncxx.py~ Mon Nov 25 11:45:14 2019 +++ suncxx.py Mon Nov 25 16:27:09 2019 @@ -69,6 +69,7 @@ try: p = subprocess.Popen([pkginfo, '-l', package_name], + encoding='utf-8', stdout=subprocess.PIPE, stderr=DEVNULL) except EnvironmentError: @@ -83,6 +84,7 @@ if pathname is None: try: p = subprocess.Popen([pkgchk, '-l', package_name], + encoding='utf-8', stdout=subprocess.PIPE, stderr=DEVNULL) except EnvironmentError: Thanks, Rob Boehne [cid:[email protected]] Rob Boehne Senior Software Architect | Datalogics, Inc. +1.312.853.8351<tel:(312)%20853-8351> | [email protected]<mailto:[email protected]> datalogics.com<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.datalogics.com%2F&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858590240&sdata=0oAKYnnCcf%2BFA%2FBoAoBSaENJ1K46TAUMvasQXOt2C28%3D&reserved=0> | blogs.datalogics.com<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblogs.datalogics.com%2F&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858590240&sdata=r%2B6gtT7q%2BfqH%2FkWfhack9lUAR0EQVyAWuzJEn2j%2BuAU%3D&reserved=0> Connect with us: Facebook<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FDatalogicsInc&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858600236&sdata=NYegc0yIidP3AvJhV8yri75VeUlAEVYN3ApMO1cZtHg%3D&reserved=0> | Twitter<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FDatalogicsInc&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858600236&sdata=fO6cOKCwLLKqwcc7AtHi6UEscT%2Bt1HcpWzeI30eJtsI%3D&reserved=0> | LinkedIn<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fdatalogics%3FactionToken%3Dp%3Dp%253Dbiz-company-login%2526c%253D3217e65a-bdc2-4b38-8f9c-13c982e8c529%2526m%253Dcompany_feed%2526n%253D0%26t%3Da%253DisFolloweeOfPoster%25253Dfalse%252526distanceFromActor%25253D-1%252526actorType%25253D%252526likedByUser%25253Dfalse%252526targetId%25253D%252526recentCommentUrns%25253D%252526targetType%25253D%252526sponsoredFlag%25253DORGANIC%252526verbType%25253Dlinkedin%2525253Ashare%252526objectType%25253Dlinkedin%2525253Aarticle%252526totalShares%25253D0%252526activityId%25253Durn%2525253Ali%2525253Aactivity%2525253A6263731876121362433%252526recentLikerUrns%25253D%252526actorId%25253Durn%2525253Ali%2525253Acompany%2525253A14000%252526totalComments%25253D0%252526relevanceScore%25253D0.0%252526recentCommenterUrns%25253D%252526isPublic%25253Dtrue%252526time%25253D-1%252526totalLikes%25253D0%252526objectId%25253Durn%2525253Ali%2525253Aarticle%2525253A7793179909183391510%252526distanceFromNestedActor%25253D-1%2526s%253DORG&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858600236&sdata=UX88hkb8ZIbJT66zXr%2FFkrC9A6n57GPxOAxWU0JiQO0%3D&reserved=0> | YouTube<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fuser%2FDatalogics&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858610229&sdata=BJu61XFSeaDIVAavvo%2Bunf9NDVhF2exV1eon4tPls%2Fc%3D&reserved=0> _______________________________________________ Scons-dev mailing list [email protected]<mailto:[email protected]> https://pairlist2.pair.net/mailman/listinfo/scons-dev<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist2.pair.net%2Fmailman%2Flistinfo%2Fscons-dev&data=02%7C01%7Crobb%40datalogics.com%7Cf911967827f74d1ae5e408d771fe6a73%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637103209858610229&sdata=VwvmcCEXJ0KsFgRLqGFKqhav0ETlbNCkFE4nveeUcq4%3D&reserved=0> _______________________________________________ Scons-dev mailing list [email protected] https://pairlist2.pair.net/mailman/listinfo/scons-dev
image001.png
(image/png, 121.5 KB) - not displayed