docstr: Module specific handling.
  
  This particular one does
  1. Memorize (at class level) the module name of interest here
  2. Check if 'datalad.extensions' are specified for the module,
     and then analyzes them to obtain command names it provides
  
  If cmdline commands are found, its entries are to be used instead of
  the ones in datalad's _parser.
  
  Parameters
  ----------
  **kwargs:
      all the kwargs which might be provided to setuptools.setup
docstr_tok: ["Module","specific","handling",".","This","particular","one","does","1",".","Memorize","(","at","class","level",")","the","module","name","of","interest","here","2",".","Check","if","'datalad.extensions","'","are","specified","for","the","module",",","and","then","analyzes","them","to","obtain","command","names","it","provides","If","cmdline","commands","are","found",",","its","entries","are","to","be","used","instead","of","the","ones","in","datalad","'s","_parser",".","Parameters","--","--","--","--","--","*","*","kwargs",":","all","the","kwargs","which","might","be","provided","to","setuptools.setup"]
code: def handle_module(cls, mod_name, **kwargs):
      """Module specific handling.
  
      This particular one does
      1. Memorize (at class level) the module name of interest here
      2. Check if 'datalad.extensions' are specified for the module,
         and then analyzes them to obtain command names it provides
  
      If cmdline commands are found, its entries are to be used instead of
      the ones in datalad's _parser.
  
      Parameters
      ----------
      **kwargs:
          all the kwargs which might be provided to setuptools.setup
      """
      cls.mod_name = mod_name
  
      exts = kwargs.get("entry_points", {}).get(
          "datalad.extensions", []
      )
      for ext in exts:
          assert "=" in ext  # should be label=module:obj
          ext_label, mod_obj = ext.split("=", 1)
          assert ":" in mod_obj  # should be module:obj
          mod, obj = mod_obj.split(":", 1)
          assert mod_name == mod  # AFAIK should be identical
  
          mod = __import__(mod_name)
          if hasattr(mod, obj):
              command_suite = getattr(mod, obj)
              assert len(command_suite) == 2  # as far as I see it
              if not hasattr(cls, "cmdline_names"):
                  cls.cmdline_names = []
              cls.cmdline_names += [
                  cmd for _, _, cmd, _ in command_suite[1]
              ]
  
imports: import datetime
  import os
  import platform
  import sys
  from os import linesep, makedirs
  from os.path import dirname
  from os.path import join
  from os.path import sep
  from os.path import splitext
  import setuptools
  from genericpath import exists
  from packaging.version import Version
  from setuptools import Command, DistutilsOptionError, find_namespace_packages, findall, setup
  from .None import formatters
label_desc: Use image node_id 3 for calling the BuildManPage obj's underlying member method code with example usage: obj.handle_module(cls, mod_name) without return types