Print

Print


When you `import setuptools`, or anything inside `setuptools`, that injects ([1](https://github.com/pypa/setuptools/blob/6f7dd7c12ceffa2aefe28c2fbafbad2273980b2b/setuptools/__init__.py#L8), [2](https://github.com/pypa/setuptools/blob/6f7dd7c12ceffa2aefe28c2fbafbad2273980b2b/_distutils_hack/__init__.py#L18-L25)) `setuptools._distutils` as `distutils` in `sys.modules`. IIRC, pip also injects setuptool's distutils for you in some cases, but I wouldn't depend on that. But yes, you should always `import setuptools` before touching distutils. This is especially true in Python 3.12a2+, where distutils has been removed.

Though it looks like you do avoid that? Why are you getting `setup` & `Extension` from `setuptools._distutils.core` instead of `setuptools`, though? `egg_info` is a setuptools thing, so that's likely why the distutils version is broken.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1830#issuecomment-1332598290
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1