Skip to content

Commit c9c46d4

Browse files
authored
chore: remove unneeded scripts, no longer need THIRD_PARTY_NOTICES (#121)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes internal issue 306233684 🦕
1 parent 59bc7be commit c9c46d4

File tree

4 files changed

+1
-586
lines changed

4 files changed

+1
-586
lines changed

.kokoro/release-nightly.sh

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,6 @@ export PYTHONUNBUFFERED=1
6363
# Install dependencies, as the following steps depend on it
6464
python3.10 -m pip install -e .[all]
6565

66-
# Generate third party notices and include it in the licenses in setup.cfg
67-
# TODO(shobs): Don't include it in the package once vertex colab can pick it
68-
# from elsewhere
69-
THIRD_PARTY_NOTICES_FILE=THIRD_PARTY_NOTICES
70-
python3.10 -m pip install pip-licenses
71-
python3.10 scripts/generate_third_party_notices.py --output-file ${THIRD_PARTY_NOTICES_FILE}
72-
if ! [ -s ${THIRD_PARTY_NOTICES_FILE} ]; then
73-
echo "${THIRD_PARTY_NOTICES_FILE} was generated with zero size"
74-
exit -1
75-
fi
76-
SETUP_CFG_BKP=`mktemp`
77-
cp -f setup.cfg ${SETUP_CFG_BKP}
78-
cat >> setup.cfg << EOF
79-
80-
[metadata]
81-
license_files =
82-
LICENSE
83-
${THIRD_PARTY_NOTICES_FILE}
84-
EOF
85-
8666
# Update version string to include git hash and date
8767
CURRENT_DATE=$(date '+%Y%m%d')
8868
GIT_HASH=$(git rev-parse --short HEAD)
@@ -101,33 +81,13 @@ if [ $num_wheel_files -ne 1 ] ; then
10181
exit -1
10282
fi
10383

104-
# Make sure the wheel file has the third party notices included
105-
# TODO(shobs): An utimate validation would be to create a virtual environment
106-
# and install the wheel file, then verify that
107-
# site-packages/bigframes-*.dist-info/ includes third party notices
108-
python3.10 -c "
109-
from zipfile import ZipFile
110-
with ZipFile('$VERSION_WHEEL') as myzip:
111-
third_party_licenses_info = [
112-
info
113-
for info in myzip.infolist()
114-
if info.filename.endswith('.dist-info/${THIRD_PARTY_NOTICES_FILE}')
115-
]
116-
assert (
117-
len(third_party_licenses_info) == 1
118-
), f'Found {len(third_party_licenses_info)} third party licenses'
119-
assert (
120-
third_party_licenses_info[0].file_size > 0
121-
), 'Package contains third party license of size 0'
122-
"
123-
12484
# Create a copy of the wheel with a well known, version agnostic name
12585
LATEST_WHEEL=dist/bigframes-latest-py2.py3-none-any.whl
12686
cp $VERSION_WHEEL $LATEST_WHEEL
12787
cp dist/bigframes-*.tar.gz dist/bigframes-latest.tar.gz
12888

12989
if ! [ ${DRY_RUN} ]; then
130-
for gcs_path in gs://vertex_sdk_private_releases/bigframe/ \
90+
for gcs_path in gs://vertex_sdk_private_releases/bigframe/ \
13191
gs://dl-platform-colab/bigframes/ \
13292
gs://bigframes-wheels/;
13393
do
@@ -155,8 +115,6 @@ fi
155115
# the changes were made but before this cleanup, because the script would
156116
# terminate with the failure itself. See if we can ensure the cleanup.
157117
sed -i -e "s/$RELEASE_VERSION/$BIGFRAMES_VERSION/g" bigframes/version.py
158-
mv -f ${SETUP_CFG_BKP} setup.cfg
159-
rm -f ${THIRD_PARTY_NOTICES_FILE}
160118

161119
if ! [ ${DRY_RUN} ]; then
162120
# Copy docs and wheels to Google Drive

0 commit comments

Comments
 (0)