-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathsetup.py
56 lines (52 loc) · 1.85 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import errno
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import check_call
class InstallPluginCommand(install):
def run(self):
install.run(self)
try:
check_call(['pulumi', 'plugin', 'install', 'resource', 'gcp', '${PLUGIN_VERSION}'])
except OSError as error:
if error.errno == errno.ENOENT:
print("""
There was an error installing the gcp resource provider plugin.
It looks like `pulumi` is not installed on your system.
Please visit https://pulumi.com/ to install the Pulumi CLI.
You may try manually installing the plugin by running
`pulumi plugin install resource gcp ${PLUGIN_VERSION}`
""")
else:
raise
def readme():
with open('README.md', encoding='utf-8') as f:
return f.read()
setup(name='pulumi_gcp',
version='${VERSION}',
description="A Pulumi package for creating and managing Google Cloud Platform resources.",
long_description=readme(),
long_description_content_type='text/markdown',
cmdclass={
'install': InstallPluginCommand,
},
keywords='pulumi gcp',
url='https://pulumi.io',
project_urls={
'Repository': 'https://github.com/pulumi/pulumi-gcp'
},
license='Apache-2.0',
packages=find_packages(),
package_data={
'pulumi_gcp': [
'py.typed'
]
},
install_requires=[
'parver>=0.2.1',
'pulumi>=2.0.0,<3.0.0',
'semver>=2.8.1'
],
zip_safe=False)