michael-s-molina commented on code in PR #24436: URL: https://github.com/apache/superset/pull/24436#discussion_r1275404460
########## setup.py: ########## @@ -16,15 +16,40 @@ # under the License. import json import os +import re import subprocess +import sys from setuptools import find_packages, setup BASE_DIR = os.path.abspath(os.path.dirname(__file__)) PACKAGE_JSON = os.path.join(BASE_DIR, "superset-frontend", "package.json") -with open(PACKAGE_JSON) as package_file: - version_string = json.load(package_file)["version"] +parameters = {} + +# Regex pattern to match arguments in the form --param=value +pattern = re.compile(r"^--(\w+)=(.+)$") + +non_custom_parameters = [] + +# Check for custom parameters in sys.argv +for arg in sys.argv: Review Comment: It seems there's a problem when installing with `pip` because `sys.argv` will be empty and the version will be extracted from `package.json` which will differ from the one used when generating the distribution. Check https://apache-superset.slack.com/archives/CH307T4JG/p1690394803412959?thread_ts=1690244664.795569&cid=CH307T4JG -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org