github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/dashed-import-schema/python/setup.py (about) 1 # coding=utf-8 2 # *** WARNING: this file was generated by test. *** 3 # *** Do not edit by hand unless you're certain you know what you are doing! *** 4 5 import errno 6 from setuptools import setup, find_packages 7 from setuptools.command.install import install 8 from subprocess import check_call 9 10 11 VERSION = "0.0.0" 12 PLUGIN_VERSION = "0.0.0" 13 14 class InstallPluginCommand(install): 15 def run(self): 16 install.run(self) 17 try: 18 check_call(['pulumi', 'plugin', 'install', 'resource', 'plant', PLUGIN_VERSION]) 19 except OSError as error: 20 if error.errno == errno.ENOENT: 21 print(f""" 22 There was an error installing the plant resource provider plugin. 23 It looks like `pulumi` is not installed on your system. 24 Please visit https://pulumi.com/ to install the Pulumi CLI. 25 You may try manually installing the plugin by running 26 `pulumi plugin install resource plant {PLUGIN_VERSION}` 27 """) 28 else: 29 raise 30 31 32 def readme(): 33 try: 34 with open('README.md', encoding='utf-8') as f: 35 return f.read() 36 except FileNotFoundError: 37 return "plant Pulumi Package - Development Version" 38 39 40 setup(name='pulumi_plant', 41 version=VERSION, 42 long_description=readme(), 43 long_description_content_type='text/markdown', 44 cmdclass={ 45 'install': InstallPluginCommand, 46 }, 47 packages=find_packages(), 48 package_data={ 49 'pulumi_plant': [ 50 'py.typed', 51 'pulumi-plugin.json', 52 ] 53 }, 54 install_requires=[ 55 'parver>=0.2.1', 56 'pulumi', 57 'semver>=2.8.1' 58 ], 59 zip_safe=False)