Open sebastian-philipp opened 5 years ago
I ended up using something like
import distutils import subprocess from setuptools import setup class MkCodesCommand(distutils.cmd.Command): """A custom command to run MkCodes.""" description = 'run mkcodes' user_options:list = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): """Run command.""" subprocess.check_call('mkcodes --github --output rook_ceph_client/tests/test_{name}.py README.md'.split()) setup( ... cmdclass={ 'mkcodes': MkCodesCommand, }, )
would be nice to have a better recipe / integration provided as an example
I've modified the tests to use click's CliRunner class rather than subprocess, which should work for your use case as well. Perhaps we should expose a thin wrapper around CliRunner.
CliRunner
I ended up using something like
would be nice to have a better recipe / integration provided as an example