From 65268b9826b50fb269b7060dde4fd489cc6f701f Mon Sep 17 00:00:00 2001 From: Wael Date: Wed, 30 Aug 2023 19:39:42 +0200 Subject: [PATCH] Fix: Remove unneeded directory "schema" (#5753) * Remove unneeded directory "schema" * add schema to excluded packages * sync build linux & mac * fix make pr * exclude schema from setup.py + PYTHONPATH for make schema * run schema with -m --------- Co-authored-by: Lucas <12496191+lucashuy@users.noreply.github.com> --- Makefile | 4 ++-- installer/pyinstaller/build-linux.sh | 1 + installer/pyinstaller/build-mac.sh | 15 ++++++++++++++- setup.py | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) mode change 100644 => 100755 installer/pyinstaller/build-mac.sh diff --git a/Makefile b/Makefile index 081f22d6ae..3bc09d645b 100644 --- a/Makefile +++ b/Makefile @@ -52,8 +52,8 @@ black-check: format: black ruff samcli --fix -schema: - python schema/make_schema.py +schema: + python -m schema.make_schema # Verifications to run before sending a pull request pr: init dev schema black-check diff --git a/installer/pyinstaller/build-linux.sh b/installer/pyinstaller/build-linux.sh index 2b728866da..04fac68975 100755 --- a/installer/pyinstaller/build-linux.sh +++ b/installer/pyinstaller/build-linux.sh @@ -54,6 +54,7 @@ rm -rf ./output/aws-sam-cli-src/tests rm -rf ./output/aws-sam-cli-src/designs rm -rf ./output/aws-sam-cli-src/docs rm -rf ./output/aws-sam-cli-src/media +rm -rf ./output/aws-sam-cli-src/schema rm -rf ./output/aws-sam-cli-src/Make.ps1 rm -rf ./output/aws-sam-cli-src/CODEOWNERS rm -rf ./output/aws-sam-cli-src/CODE_OF_CONDUCT.md diff --git a/installer/pyinstaller/build-mac.sh b/installer/pyinstaller/build-mac.sh old mode 100644 new mode 100755 index 7a69a6b0a4..f003274cae --- a/installer/pyinstaller/build-mac.sh +++ b/installer/pyinstaller/build-mac.sh @@ -71,8 +71,21 @@ echo "Copying Source" cp -r ../[!.]* ./src cp -r ./src/* ./output/aws-sam-cli-src -echo "Removing CI Scripts" +echo "Removing CI Scripts and other files/direcories not needed" rm -vf ./output/aws-sam-cli-src/appveyor*.yml +rm -rf ./output/aws-sam-cli-src/tests +rm -rf ./output/aws-sam-cli-src/designs +rm -rf ./output/aws-sam-cli-src/docs +rm -rf ./output/aws-sam-cli-src/media +rm -rf ./output/aws-sam-cli-src/schema +rm -rf ./output/aws-sam-cli-src/Make.ps1 +rm -rf ./output/aws-sam-cli-src/CODEOWNERS +rm -rf ./output/aws-sam-cli-src/CODE_OF_CONDUCT.md +rm -rf ./output/aws-sam-cli-src/CONTRIBUTING.md +rm -rf ./output/aws-sam-cli-src/DESIGN.md +rm -rf ./output/aws-sam-cli-src/Makefile +rm -rf ./output/aws-sam-cli-src/mypy.ini +rm -rf ./output/aws-sam-cli-src/pytest.ini echo "Installing Python" curl "https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tgz" --output python.tgz diff --git a/setup.py b/setup.py index 792fed29f5..d1050860b6 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ def read_version(): author_email="aws-sam-developers@amazon.com", url="https://github.com/aws/aws-sam-cli", license="Apache License 2.0", - packages=find_packages(exclude=["tests.*", "tests", "installer.*", "installer"]), + packages=find_packages(exclude=["tests.*", "tests", "installer.*", "installer", "schema.*", "schema"]), keywords="AWS SAM CLI", # Support Python 3.7 or greater python_requires=">=3.7, <=4.0, !=4.0",