Created
December 26, 2017 20:16
-
-
Save odedniv/f1633874e31a891c36da296d4df0729c to your computer and use it in GitHub Desktop.
Execute custom command inside setup.py's sandbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestMappingsCommand(distutils.cmd.Command): | |
user_options = [] | |
def initialize_options(self): | |
pass | |
def finalize_options(self): | |
pass | |
def run(self): | |
# installs everything in install_requires (in setup.py) in a sandbox | |
self.distribution.fetch_build_eggs(self.distribution.install_requires) | |
# runs another command within the sandbox | |
self.run_command('compile_confugration_resources') | |
# executes a script within the sandbox | |
imp.load_source('compare_mappings', "scripts/compare-mappings.py").main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment