I am migrating the configurations from setup.py to setup.cfg but I have a problem with cmdclass keyword. I looked into setuptools docs and it seems like this keyword is not documented or supported. So I tried options.entry_points instead. But I keep getting invalid command error.
Here is what I have:
setup.cfg
[options.entry_points]
console_scripts =
install = CustomInstall:run
and
setup.py
from setuptools.command.install import install
from setuptools import setup
class CustomInstall(install):
def run(self):
print('overriden install command')
setup()
The result was just a normal install command. However, I would like to replicate the behaviour that I get when I run:
# setup.py
from setuptools.command.install import install
from setuptools import setup
class CustomInstall(install):
def run(self):
print('overriden install command')
setup(cmdclass= {"install": CustomInstall})
which gives an overriden install command.