title: Python setup.py not running post installation
body: <p>I have a Python project (let's call it Project A) which contains a setup.py file as following:</p>
  <pre><code>from setuptools import setup
  from setuptools import find_namespace_packages
  from setuptools.command.develop import develop
  from setuptools.command.install import install
  
  
  def post_installation():
      import nltk
      nltk.download('punkt')
      nltk.download('wordnet')
      nltk.download('averaged_perceptron_tagger')
  
  
  class PostDevelopCommand(develop):
      &quot;&quot;&quot;Post-installation for development mode.&quot;&quot;&quot;
  
      def run(self):
          develop.run(self)
          post_installation()
  
  
  class PostInstallCommand(install):
      &quot;&quot;&quot;Post-installation for installation mode.&quot;&quot;&quot;
  
      def run(self):
          install.run(self)
          post_installation()
  
  
  # Setup script
  setup(
      name='my-project-a',
      version='1.2.3',
      description='My project A',
      long_description=open('README.md').read(),
      long_description_content_type='text/markdown',
      packages=find_namespace_packages(exclude=['tests', 'tests.*']),
      install_requires=list(open('requirements.txt')),
      test_suite='tests',
      cmdclass={
          'develop': PostDevelopCommand,
          'install': PostInstallCommand
      }
  )
  </code></pre>
  <p>And then, I used twine to deploy it to AWS Code Artifact in a GitHub action:</p>
  <pre><code>  - name: &quot;Publish to AWS CodeArtifact&quot;
          if: env.BUMPED == 'TRUE'
          run: |
            python3 setup.py sdist bdist_wheel
            twine upload --repository codeartifact dist/*
  
  </code></pre>
  <p>And then, I added this project as a dependency to another project (Let's call it ProjectB) in requirements.txt.
  The problem is that, when I install all dependencies in requirements.txt at ProjectB, the Post installation from ProjectA is not being executed in ProjectB, which leads the code to crash, because NLTK modules were not installed.</p>