From c5b1fe1a2462fe89cff5dd5e31fca5b8b586eb53 Mon Sep 17 00:00:00 2001 From: Toby Fleming Date: Mon, 9 Dec 2019 16:18:47 -0800 Subject: [PATCH] Remove buildspec, update README for simplified installation instructions --- NOTICE | 2 +- README.md | 23 ++++++++++++----------- buildspec.yml | 34 ---------------------------------- setup.py | 2 +- 4 files changed, 14 insertions(+), 47 deletions(-) delete mode 100644 buildspec.yml diff --git a/NOTICE b/NOTICE index 663a6b79..a8d8802e 100644 --- a/NOTICE +++ b/NOTICE @@ -1,2 +1,2 @@ -AWS CloudFormation RPDK Java Plugin +CloudFormation CLI Java Plugin Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/README.md b/README.md index 85956c34..bb772cb1 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,9 @@ This plugin library helps to provide Java runtime bindings for the execution of Usage ----- -If you are using this package to build resource providers for CloudFormation, install the [CloudFormation CLI](https://github.com/aws-cloudformation/cloudformation-cli) and the [CloudFormation CLI Java Plugin](https://github.com/aws-cloudformation/cloudformation-cli-java-plugin) +If you are using this package to build resource providers for CloudFormation, install the [CloudFormation CLI Java Plugin](https://github.com/aws-cloudformation/cloudformation-cli-java-plugin) - this will automatically install the the [CloudFormation CLI](https://github.com/aws-cloudformation/cloudformation-cli)! A Python virtual environment is recommended. ```shell -pip3 install cloudformation-cli pip3 install cloudformation-cli-java-plugin ``` @@ -19,23 +18,25 @@ Refer to the documentation for the [CloudFormation CLI](https://github.com/aws-c Development ----------- -First, you will need to install the [CloudFormation CLI](https://github.com/aws-cloudformation/cloudformation-cli), as it is a required dependency: +For changes to the plugin, a Python virtual environment is recommended. Check out and install the plugin in editable mode: ```shell -pip3 install cloudformation-cli +python3 -m venv env +source env/bin/activate +pip3 install -e /path/to/cloudformation-cli-java-plugin ``` -For changes to the plugin, a Python virtual environment is recommended. +You may also want to check out the [CloudFormation CLI](https://github.com/aws-cloudformation/cloudformation-cli) if you wish to make edits to that. In this case, installing them in one operation works well: ```shell -python3 -m venv env -source env/bin/activate -# assuming cloudformation-cli has already been cloned/downloaded -pip3 install -e . -pre-commit install +pip3 install \ + -e /path/to/cloudformation-cli \ + -e /path/to/cloudformation-cli-java-plugin ``` -Linting and running unit tests is done via [pre-commit](https://pre-commit.com/), and so is performed automatically on commit. The continuous integration also runs these checks. Manual options are available so you don't have to commit): +That ensures neither is accidentally installed from PyPI. + +Linting and running unit tests is done via [pre-commit](https://pre-commit.com/), and so is performed automatically on commit after being installed (`pre-commit install`). The continuous integration also runs these checks. Manual options are available so you don't have to commit: ```shell # run all hooks on all files, mirrors what the CI runs diff --git a/buildspec.yml b/buildspec.yml deleted file mode 100644 index b7f50ee6..00000000 --- a/buildspec.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: 0.2 -phases: - install: - runtime-versions: - java: openjdk8 - python: 3.7 - commands: - # make sure pip/setuptools/wheel is up to date, awscli for SDK patching - - cd "$CODEBUILD_SRC_DIR_RPDK" - - pip install --upgrade pip setuptools wheel awscli -r "requirements.txt" - # setup git-secrets - - WD=$(pwd) - - cd /tmp - - git clone https://github.com/awslabs/git-secrets.git - - cd git-secrets - - make install - - cd "$WD" - build: - commands: - # install aws-cloudformation-rpdk-java-plugin and rpdk core - - cd "$CODEBUILD_SRC_DIR" - - > - mvn package org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install - --batch-mode - --no-transfer-progress - - pip install "$CODEBUILD_SRC_DIR_RPDK" . - - pre-commit run --all-files - # end-to-end test - - DIR=$(mktemp -d) - - cd "$DIR" - - ls -la - - printf "AWS::Foo::Bar\n\n" | cfn init -vv - - mvn clean verify - - ls -la diff --git a/setup.py b/setup.py index 2dbf00d4..3811f17e 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def find_version(*file_paths): entry_points={"rpdk.v1.languages": ["java = rpdk.java.codegen:JavaLanguagePlugin"]}, license="Apache License 2.0", classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License",