Skip to content

Commit

Permalink
Fix incompatibilities with PEP 625 normalized sdist tarballs, enforce…
Browse files Browse the repository at this point in the history
… minimum bound for setuptools that enforces this

See: https://peps.python.org/pep-0625/
  • Loading branch information
autophagy committed Jan 30, 2025
1 parent 8b1d349 commit 7c99484
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip3 install apache-flink=={{< version >}}
{{< /stable >}}
{{< unstable >}}
COPY apache-flink*.tar.gz /
RUN pip3 install /apache-flink-libraries*.tar.gz && pip3 install /apache-flink*.tar.gz
COPY apache_flink*.tar.gz /
RUN pip3 install /apache_flink_libraries*.tar.gz && pip3 install /apache_flink*.tar.gz
{{< /unstable >}}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip3 install apache-flink=={{< version >}}
{{< /stable >}}
{{< unstable >}}
COPY apache-flink*.tar.gz /
RUN pip3 install /apache-flink-libraries*.tar.gz && pip3 install /apache-flink*.tar.gz
COPY apache_flink*.tar.gz /
RUN pip3 install /apache_flink_libraries*.tar.gz && pip3 install /apache_flink*.tar.gz
{{< /unstable >}}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ cd dev

deactivate

PYFLINK_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/dist/apache-flink-*.tar.gz)
PYFLINK_LIBRARIES_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/apache-flink-libraries/dist/apache-flink-libraries-*.tar.gz)
PYFLINK_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/dist/apache_flink-*.tar.gz)
PYFLINK_LIBRARIES_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/apache-flink-libraries/dist/apache_flink_libraries-*.tar.gz)
echo ${PYFLINK_PACKAGE_FILE}
echo ${PYFLINK_LIBRARIES_PACKAGE_FILE}
# Create a new docker image that has python and PyFlink installed.
Expand Down
4 changes: 2 additions & 2 deletions flink-end-to-end-tests/test-scripts/test_pyflink_yarn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ docker cp "${FLINK_PYTHON_TEST_DIR}/target/PythonUdfSqlJobExample.jar" master:/t
docker cp "${FLINK_PYTHON_TEST_DIR}/python/add_one.py" master:/tmp/
docker cp "${REQUIREMENTS_PATH}" master:/tmp/
docker cp "${FLINK_PYTHON_TEST_DIR}/python/python_job.py" master:/tmp/
PYFLINK_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/dist/apache-flink-*.tar.gz)
PYFLINK_LIBRARIES_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/apache-flink-libraries/dist/apache-flink-libraries-*.tar.gz)
PYFLINK_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/dist/apache_flink-*.tar.gz)
PYFLINK_LIBRARIES_PACKAGE_FILE=$(basename "${FLINK_PYTHON_DIR}"/apache-flink-libraries/dist/apache_flink_libraries-*.tar.gz)
docker cp "${FLINK_PYTHON_DIR}/dist/${PYFLINK_PACKAGE_FILE}" master:/tmp/
docker cp "${FLINK_PYTHON_DIR}/apache-flink-libraries/dist/${PYFLINK_LIBRARIES_PACKAGE_FILE}" master:/tmp/

Expand Down
2 changes: 1 addition & 1 deletion flink-python/dev/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
pip>=20.3
setuptools>=18.0
setuptools>=75.8
wheel
apache-beam>=2.54.0,<=2.61.0
cython>=0.29.24
Expand Down
2 changes: 1 addition & 1 deletion flink-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Minimum requirements for the build system to execute.
requires = [
"packaging>=20.5; platform_machine=='arm64'", # macos M1
"setuptools>=18.0",
"setuptools>=75.8",
"wheel",
"apache-beam>=2.54.0,<=2.61.0",
"cython>=0.29.24",
Expand Down
4 changes: 2 additions & 2 deletions tools/releasing/create_binary_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ make_python_release() {
python setup.py sdist
pushd dist/
apache_flink_libraries_actual_name=`echo *.tar.gz`
apache_flink_libraries_release_name="apache-flink-libraries-${PYFLINK_VERSION}.tar.gz"
apache_flink_libraries_release_name="apache_flink_libraries-${PYFLINK_VERSION}.tar.gz"

if [[ "$apache_flink_libraries_actual_name" != "$apache_flink_libraries_release_name" ]] ; then
echo -e "\033[31;1mThe file name of the python package: ${apache_flink_libraries_actual_name} is not consistent with given release version: ${PYFLINK_VERSION}!\033[0m"
Expand All @@ -112,7 +112,7 @@ make_python_release() {
deactivate
cd dist/
pyflink_actual_name=`echo *.tar.gz`
pyflink_release_name="apache-flink-${PYFLINK_VERSION}.tar.gz"
pyflink_release_name="apache_flink-${PYFLINK_VERSION}.tar.gz"

if [[ "$pyflink_actual_name" != "$pyflink_release_name" ]] ; then
echo -e "\033[31;1mThe file name of the python package: ${pyflink_actual_name} is not consistent with given release version: ${PYFLINK_VERSION}!\033[0m"
Expand Down

0 comments on commit 7c99484

Please sign in to comment.