[Distutils] Python module for use in ‘setup.py’ but not to install

Ethan Furman ethan at stoneleaf.us
Sun Feb 1 01:23:00 CET 2015


On 01/31/2015 04:11 PM, Nick Coghlan wrote:
> On 1 February 2015 at 06:19, Ethan Furman wrote:
>>
>> Ah, so it's needed with the sdist command and not the install command?  Yeah, you definitely have my sympathies with
>> that one.  Too bad there's no easy way to specify behavior based on the command used... (hopefully someone will now tell
>> how I am wrong about that ;) .
> 
> You're right, which is why PEP 426 has a more fine-grained dependency
> specification model (separating runtime, build, test and development
> dependencies).
> 
> Other things are higher on the todo list right now than pushing that
> forward, but we'll get there eventually.

I guess in the mean time we can do things like:

  import sys
  if 'sdist' in sys.argv:
      import sdist_dependency

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150131/f52e4c33/attachment.sig>


More information about the Distutils-SIG mailing list