Skip to content

Commit ece44a9

Browse files
author
avijayanhwx
authored
[AMBARI-24706] Fix issues in ambari common python package publishing utility. (apache#2394)
1 parent f7008b3 commit ece44a9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

install-ambari-python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function deploy() {
9797
local version="$2"
9898
local repo_id="$3"
9999
local repo_url="$4"
100-
mvn deploy:deploy-file -Dfile=$artifact_file -Dpackaging=tar.gz -DgeneratePom=true -Dversion=$version -DartifactId=ambari-python -DgroupId=org.apache.ambari -Durl="$repo_url" -DrepositoryId="$repo_url"
100+
mvn gpg:sign-and-deploy-file -Dfile=$artifact_file -Dpackaging=tar.gz -DgeneratePom=true -Dversion=$version -DartifactId=ambari-python -DgroupId=org.apache.ambari -Durl="$repo_url" -DrepositoryId="$repo_url"
101101
}
102102

103103
function run_setup_py() {

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
AMBARI_COMMON_PYTHON_FOLDER = "ambari-common/src/main/python"
2525
AMBARI_SERVER_TEST_PYTHON_FOLDER = "ambari-server/src/test/python"
26+
AMBARI_COMMON_TEST_PYTHON_FOLDER = "ambari-common/src/test/python"
2627

2728
def get_ambari_common_packages():
2829
return find_packages(AMBARI_COMMON_PYTHON_FOLDER, exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
@@ -31,7 +32,7 @@ def get_ambari_server_stack_package():
3132
return ["stacks.utils"]
3233

3334
def get_extra_common_packages():
34-
return ["urlinfo_processor", "ambari_jinja2", "ambari_jinja2._markupsafe"]
35+
return ["urlinfo_processor", "ambari_jinja2", "ambari_jinja2._markupsafe", "mock", "mock.test"]
3536

3637
def create_package_dir_map():
3738
package_dirs = {}
@@ -45,6 +46,8 @@ def create_package_dir_map():
4546
package_dirs["ambari_jinja2"] = AMBARI_COMMON_PYTHON_FOLDER + "/ambari_jinja2/ambari_jinja2"
4647
package_dirs["ambari_jinja2._markupsafe"] = AMBARI_COMMON_PYTHON_FOLDER + "/ambari_jinja2/ambari_jinja2/_markupsafe"
4748
package_dirs["urlinfo_processor"] = AMBARI_COMMON_PYTHON_FOLDER + "/urlinfo_processor"
49+
package_dirs["mock"] = AMBARI_COMMON_TEST_PYTHON_FOLDER + "/mock"
50+
package_dirs["mock.test"] = AMBARI_COMMON_TEST_PYTHON_FOLDER + "/mock/tests"
4851

4952
return package_dirs
5053

@@ -102,7 +105,6 @@ def get_version():
102105
packages = get_ambari_common_packages() + get_ambari_server_stack_package() + get_extra_common_packages(),
103106
package_dir = create_package_dir_map(),
104107
install_requires=[
105-
'mock==1.0.1',
106108
'coilmq==1.0.1'
107109
],
108110
include_package_data = True,

0 commit comments

Comments
 (0)