Skip to content

Commit

Permalink
[FLINK-32971][python] Add proper development version support in pyflink
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborgsomogyi authored Aug 28, 2023
1 parent ab41e4f commit 171524f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ flink-python/dev/.conda/
flink-python/dev/log/
flink-python/dev/.stage.txt
flink-python/.eggs/
flink-python/apache-flink-*.dev0/
flink-python/apache-flink-libraries/apache_flink_libraries-*.dev0/
flink-python/apache-flink-*.dev*/
flink-python/apache-flink-libraries/apache_flink_libraries-*.dev*/
flink-python/**/*.c
flink-python/.idea/
flink-python/**/*.so
Expand Down
3 changes: 2 additions & 1 deletion flink-python/apache-flink-libraries/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io
import os
import platform
import re
import subprocess
import sys
from shutil import copytree, copy, rmtree
Expand Down Expand Up @@ -97,7 +98,7 @@ def find_file_path(pattern):
print("Temp path for symlink to parent already exists {0}".format(TEMP_PATH),
file=sys.stderr)
sys.exit(-1)
flink_version = VERSION.replace(".dev0", "-SNAPSHOT")
flink_version = re.sub("[.]dev.*", "-SNAPSHOT", VERSION)
FLINK_HOME = os.path.abspath(
"../../flink-dist/target/flink-%s-bin/flink-%s" % (flink_version, flink_version))

Expand Down
5 changes: 3 additions & 2 deletions flink-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io
import os
import platform
import re
import sys
from distutils.command.build_ext import build_ext
from shutil import copytree, copy, rmtree
Expand Down Expand Up @@ -206,7 +207,7 @@ def extracted_output_files(base_dir, file_path, output_directory):
print("Temp path for symlink to parent already exists {0}".format(TEMP_PATH),
file=sys.stderr)
sys.exit(-1)
flink_version = VERSION.replace(".dev0", "-SNAPSHOT")
flink_version = re.sub("[.]dev.*", "-SNAPSHOT", VERSION)
FLINK_HOME = os.path.abspath(
"../flink-dist/target/flink-%s-bin/flink-%s" % (flink_version, flink_version))
FLINK_ROOT = os.path.abspath("..")
Expand Down Expand Up @@ -252,7 +253,7 @@ def extracted_output_files(base_dir, file_path, output_directory):
"is complete, or do this in the flink-python directory of the flink source "
"directory.")
sys.exit(-1)
if VERSION.find('dev0') != -1:
if re.search('dev.*$', VERSION) is not None:
apache_flink_libraries_dependency = 'apache-flink-libraries==%s' % VERSION
else:
split_versions = VERSION.split('.')
Expand Down

0 comments on commit 171524f

Please sign in to comment.