From 7e283b8426db9e07d8e700b27b78686ff043b258 Mon Sep 17 00:00:00 2001 From: Chris Hillery Date: Fri, 24 Sep 2021 03:57:44 -0700 Subject: [PATCH] Cleanup: updated README and environment-creation instructions Deleted construct.yaml (no longer used). Change-Id: I6e7ed3c34593a898e04808bb08e4095b5575f98d Reviewed-on: http://review.couchbase.org/c/tlm/+/162259 Reviewed-by: Blair Watt Tested-by: Chris Hillery --- deps/packages/cbpy/README.md | 23 ++++++++++--------- deps/packages/cbpy/construct.yaml | 15 ------------ .../couchbase-server-black-duck-manifest.yaml | 2 +- deps/packages/cbpy/environment-base.txt | 5 ++-- 4 files changed, 16 insertions(+), 29 deletions(-) delete mode 100644 deps/packages/cbpy/construct.yaml diff --git a/deps/packages/cbpy/README.md b/deps/packages/cbpy/README.md index f31d8f76..1d06fd72 100644 --- a/deps/packages/cbpy/README.md +++ b/deps/packages/cbpy/README.md @@ -1,16 +1,17 @@ -This directory contains build steps to create "cbpy-installer", which is an -Anaconda-based installer for a customized Python 3 distribution. This -distribution will be installed on customer machines, and that installation -will be used for all Python 3 scripts that we ship. +This directory contains build steps to create "cbpy", which is a +standalone customized Python 3 package. This package will be installed +on customer machines as part of Server, and will be used for all Python +3 scripts that we ship. Therefore, if you write any Python 3 scripts that require a new third-party Python library, we must add it here to ensure that it is available in production. -This used to be part of the Server build itself, but as it grew somewhat more -complex, it made sense to pull it out to a separate build. I'm making this a -cbdeps 1.0 package (ie, here in tlm/deps/packages rather than driven by a -separate manifest) because this actually IS effectively part of the Server -build. This also means we can keep the couchbase-server-specific Black Duck -manifest here in the same location as construct.yaml, making it easier to keep -them in sync. +This used to be part of the Server build itself, but as it grew somewhat +more complex, it made sense to pull it out to a separate build. I'm +making this a cbdeps 1.0 package (ie, here in tlm/deps/packages rather +than driven by a separate manifest) because this actually IS effectively +part of the Server build. This also means we can keep the +couchbase-server-specific Black Duck manifest here in the same location +as the environment files which define what python libraries are +included, making it easier to keep them in sync. diff --git a/deps/packages/cbpy/construct.yaml b/deps/packages/cbpy/construct.yaml deleted file mode 100644 index 8b8e29a0..00000000 --- a/deps/packages/cbpy/construct.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: cbpy -version: 1.0.0 -installer_filename: cbpy-installer - -# Unfortunately many Windows conda packages are packaged badly -# ( https://github.com/ContinuumIO/anaconda-issues/issues/12156 ) -# so we have to bypass this useful safety check. -ignore_duplicate_files: true - -post_install: post_install.bat [win] - -channels: - - https://repo.anaconda.com/pkgs/main/ - -environment: ./cbpy-environment diff --git a/deps/packages/cbpy/couchbase-server-black-duck-manifest.yaml b/deps/packages/cbpy/couchbase-server-black-duck-manifest.yaml index 6d5f0301..1cbba210 100644 --- a/deps/packages/cbpy/couchbase-server-black-duck-manifest.yaml +++ b/deps/packages/cbpy/couchbase-server-black-duck-manifest.yaml @@ -1,7 +1,7 @@ components: # Please keep these entries in the same order as the corresponding - # lines in construct.yaml, for ease of comparison + # lines in environment-*.txt, for ease of comparison python: bd-id: ee4d67e0-63f9-409d-a9be-1c30de64873d versions: [ 3.9.6 ] diff --git a/deps/packages/cbpy/environment-base.txt b/deps/packages/cbpy/environment-base.txt index 07e913e8..d48d2d67 100644 --- a/deps/packages/cbpy/environment-base.txt +++ b/deps/packages/cbpy/environment-base.txt @@ -24,8 +24,9 @@ readline=8.1.9 # the same version in cbdeps. # # The best way to create/update this list is to run the commands in -# cbpy_unix.sh / cbpy_windows.bat by hand until the comment "Populate cbpy -# environment". Then run +# cbpy_unix.sh / cbpy_windows.bat by hand up to and including +# "conda create -y -n cbpy". Then run: +# conda activate cbpy # conda install -y -c ./conda-pkgs \ # python=3.9.5 chardet=4.0.0.9 ... # all explicit and faked deps # conda update --update-all