PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Saturday the 1st of November, 2014

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[19:50:00] <tdsmith> Is there a good way to discover whether a setup.py uses setuptools or plain distutils? For Homebrew, we always want to use distutils to do the install (i.e., by passing --single-version-externally-managed to setuptools-based setup.py's).
[19:50:20] <tdsmith> Unfortunately, distutils setup.py's choke on that argument
[19:50:27] <dstufft> tdsmith: No, but you can do the trick pip does to force it to always be setuptools
[19:50:37] <dstufft> (or you can use pip to do the install and let us handle it)
[19:51:28] <dstufft> github.com/pypa/pip/blob/develop/pip/req/req_install.py#L745-L781
[19:52:37] <tdsmith> Oh, huh, okay
[19:52:45] <tdsmith> I'd like to use pip but Apple doesn't ship it IIRC
[19:52:53] <tdsmith> I guess we could vendor pip
[19:54:24] <tdsmith> I did notice that setuptools setup.py's exit on code 0 for setup.py install --single-version-externally-managed --help and distutils exits with code 1
[20:04:25] <dstufft> tdsmith: doesn't Homebrew ship pip with it's Python's?
[20:05:25] <dstufft> yea
[20:05:26] <dstufft> github.com/Homebrew/homebrew/blob/master/Library/Formula/python.rb#L39-L42
[20:05:29] <tdsmith> Yes, but we don't require that Homebrew users install Homebrew's Python in order to use Python things; we force the use of Apple's Python for apps that happen to be written in Python and don't install bindings people are likely to want to import
[20:05:36] <dstufft> tdsmith: oic
[20:05:52] <dstufft> I don't use homebrew python anymore, I wasn't aware of that :)
[20:06:21] <dstufft> you might want to just copy the trick we do then, essentially you just need to import setuptools before running the setup.py
[20:07:32] <tdsmith> Sounds like a plan; thanks for the pointer
[20:08:11] <dstufft> (import setuptools triggers setuptools to monkeypatch things inside of distutils, so it doesn't matter if people import from distutils or setuptools in that case)