From 8dfbb39cdb5bfcdb536aa41cad60ad912bd1ee1a Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 12 Apr 2023 02:36:32 +0000 Subject: automatic import of python-cdk-common --- .gitignore | 1 + python-cdk-common.spec | 236 +++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 238 insertions(+) create mode 100644 python-cdk-common.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..0b0ce03 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/cdk-common-2.0.461.tar.gz 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 +[![NPM version](https://badge.fury.io/js/cdk-common.svg)](https://badge.fury.io/js/cdk-common) +[![PyPI version](https://badge.fury.io/py/cdk-common.svg)](https://badge.fury.io/py/cdk-common) +[![release](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml/badge.svg)](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml) + +![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray) +![npm](https://img.shields.io/npm/dt/cdk-common?label=npm&color=orange) +![PyPI](https://img.shields.io/pypi/dm/cdk-common?label=pypi&color=blue) + +# 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 +[![NPM version](https://badge.fury.io/js/cdk-common.svg)](https://badge.fury.io/js/cdk-common) +[![PyPI version](https://badge.fury.io/py/cdk-common.svg)](https://badge.fury.io/py/cdk-common) +[![release](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml/badge.svg)](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml) + +![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray) +![npm](https://img.shields.io/npm/dt/cdk-common?label=npm&color=orange) +![PyPI](https://img.shields.io/pypi/dm/cdk-common?label=pypi&color=blue) + +# 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 +[![NPM version](https://badge.fury.io/js/cdk-common.svg)](https://badge.fury.io/js/cdk-common) +[![PyPI version](https://badge.fury.io/py/cdk-common.svg)](https://badge.fury.io/py/cdk-common) +[![release](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml/badge.svg)](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml) + +![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray) +![npm](https://img.shields.io/npm/dt/cdk-common?label=npm&color=orange) +![PyPI](https://img.shields.io/pypi/dm/cdk-common?label=pypi&color=blue) + +# 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 - 2.0.461-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..19d3875 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +544ccebaac4c31a0e53f710d1b464d67 cdk-common-2.0.461.tar.gz -- cgit v1.2.3