diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-12 02:36:32 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 02:36:32 +0000 |
| commit | 8dfbb39cdb5bfcdb536aa41cad60ad912bd1ee1a (patch) | |
| tree | 185e8b41da3300ca32fc7528572a52516341d993 /python-cdk-common.spec | |
| parent | fa34b509487c9c24fd336c93147c71a1f4465cb2 (diff) | |
automatic import of python-cdk-common
Diffstat (limited to 'python-cdk-common.spec')
| -rw-r--r-- | python-cdk-common.spec | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/python-cdk-common.spec b/python-cdk-common.spec new file mode 100644 index 0000000..3e9f8fe --- /dev/null +++ b/python-cdk-common.spec @@ -0,0 +1,236 @@ +%global _empty_manifest_terminate_build 0 +Name: python-cdk-common +Version: 2.0.461 +Release: 1 +Summary: Common AWS CDK librarys. +License: Apache-2.0 +URL: https://github.com/neilkuan/cdk-common.git +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7b/8c/14994c4abc80beb702fa970571c7b372496710cd350b0588db7b188a9919/cdk-common-2.0.461.tar.gz +BuildArch: noarch + +Requires: python3-aws-cdk-lib +Requires: python3-constructs +Requires: python3-jsii +Requires: python3-publication +Requires: python3-typeguard + +%description +[](https://badge.fury.io/js/cdk-common) +[](https://badge.fury.io/py/cdk-common) +[](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml) + + + + + +# Welcome to `cdk-common` + +This Constructs Library will collection of useful `function` and `class` for AWS CDK. + +## Install + +```bash +Use the npm dist tag to opt in CDKv1 or CDKv2: + +// for CDKv2 +npm install cdk-common +or +npm install cdk-common@latest + +// for CDKv1 +npm install cdk-common@cdkv1 +``` + +💡💡💡 please click [here](https://github.com/neilkuan/cdk-common/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.💡💡💡 + +### AWS Managed Policies `enum` + +```python +import * as cdk from 'aws-cdk-lib'; +import { AWSManagedPolicies } from 'cdk-common'; +import { Construct } from 'constructs'; +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'integ-default', { env }); + +export class IntegDefault extends Construct { + constructor(scope: Construct, id: string ) { + super(scope, id); + + const role = new iam.Role(this, 'iamrole', { + assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'), + }); + // Use this way. + role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName(AWSManagedPolicies.AMAZON_SSM_MANAGED_INSTANCE_CORE)); + + // Not this way. + role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore')); + } +} +``` + + +%package -n python3-cdk-common +Summary: Common AWS CDK librarys. +Provides: python-cdk-common +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-cdk-common +[](https://badge.fury.io/js/cdk-common) +[](https://badge.fury.io/py/cdk-common) +[](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml) + + + + + +# Welcome to `cdk-common` + +This Constructs Library will collection of useful `function` and `class` for AWS CDK. + +## Install + +```bash +Use the npm dist tag to opt in CDKv1 or CDKv2: + +// for CDKv2 +npm install cdk-common +or +npm install cdk-common@latest + +// for CDKv1 +npm install cdk-common@cdkv1 +``` + +💡💡💡 please click [here](https://github.com/neilkuan/cdk-common/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.💡💡💡 + +### AWS Managed Policies `enum` + +```python +import * as cdk from 'aws-cdk-lib'; +import { AWSManagedPolicies } from 'cdk-common'; +import { Construct } from 'constructs'; +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'integ-default', { env }); + +export class IntegDefault extends Construct { + constructor(scope: Construct, id: string ) { + super(scope, id); + + const role = new iam.Role(this, 'iamrole', { + assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'), + }); + // Use this way. + role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName(AWSManagedPolicies.AMAZON_SSM_MANAGED_INSTANCE_CORE)); + + // Not this way. + role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore')); + } +} +``` + + +%package help +Summary: Development documents and examples for cdk-common +Provides: python3-cdk-common-doc +%description help +[](https://badge.fury.io/js/cdk-common) +[](https://badge.fury.io/py/cdk-common) +[](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml) + + + + + +# Welcome to `cdk-common` + +This Constructs Library will collection of useful `function` and `class` for AWS CDK. + +## Install + +```bash +Use the npm dist tag to opt in CDKv1 or CDKv2: + +// for CDKv2 +npm install cdk-common +or +npm install cdk-common@latest + +// for CDKv1 +npm install cdk-common@cdkv1 +``` + +💡💡💡 please click [here](https://github.com/neilkuan/cdk-common/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.💡💡💡 + +### AWS Managed Policies `enum` + +```python +import * as cdk from 'aws-cdk-lib'; +import { AWSManagedPolicies } from 'cdk-common'; +import { Construct } from 'constructs'; +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'integ-default', { env }); + +export class IntegDefault extends Construct { + constructor(scope: Construct, id: string ) { + super(scope, id); + + const role = new iam.Role(this, 'iamrole', { + assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'), + }); + // Use this way. + role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName(AWSManagedPolicies.AMAZON_SSM_MANAGED_INSTANCE_CORE)); + + // Not this way. + role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore')); + } +} +``` + + +%prep +%autosetup -n cdk-common-2.0.461 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-cdk-common -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.461-1 +- Package Spec generated |
