I want to add an entry point to setup.py that calls a static method of a class. Is that possible, and if so how? I've tried, and looked up documentation, but can not figure out how to do it.
Example: Package format:
mypackage/
setup.py
mypackage/
test.py
test.py contains:
class TestClass:
@staticmethod
test_func():
print("test print statement")
setup.py contains console scripts that look like:
entry_points={
'console_scripts': [
'run_console_script = mypackage.test:TestClass.test_func'
]}
But when I run the above code, it doesn't error, and yet nothing is printed.
According to setuptools' documentation on "Automatic Script Creation" entry-points can only be functions:
The way to use this feature is to define “entry points” in your setup script that indicate what function the generated script should import and run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With