Created
November 16, 2017 11:58
-
-
Save blink1073/7d2c34444f7b371e82ee32e5ed1bcda1 to your computer and use it in GitHub Desktop.
setup.py hooks
This file contains 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
from setuptools.command.develop import develop | |
from setuptools.command.install import install | |
class PostDevelopCommand(develop): | |
"""Post-installation for development mode.""" | |
def run(self): | |
fetch_yarn() | |
develop.run(self) | |
class PostInstallCommand(install): | |
"""Post-installation for installation mode.""" | |
def run(self): | |
fetch_yarn() | |
install.run(self) | |
cmdclass = dict( | |
develop = PostDevelopCommand, | |
install = PostInstallCommand, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment