Вы можете использовать что-то вроде ниже, чтобы сделать это
from distutils.core import setup
from distutils.command.install import install
from distutils.command.build_ext import build_ext
class InstallLocalPackage(install):
def run(self):
build_ext_command = self.distribution.get_command_obj("build_ext")
build_ext_command.debug = 1
build_ext.run(build_ext_command)
install.run(self)
setup(
name='psetup',
version='1.0.1',
packages=[''],
url='',
license='',
author='tarunlalwani',
author_email='',
description='',
cmdclass={
'install': InstallLocalPackage
}
)