tvalentyn commented on a change in pull request #16448:
URL: https://github.com/apache/beam/pull/16448#discussion_r787111889
##########
File path: sdks/python/apache_beam/runners/portability/stager.py
##########
@@ -692,6 +718,46 @@ def _populate_requirements_cache(requirements_file,
cache_dir):
]
_LOGGER.info('Executing command: %s', cmd_args)
processes.check_output(cmd_args, stderr=processes.STDOUT)
+ else: # try to download wheels
+ language_implementation_tag = 'cp'
+ language_version_tag = '%d%d' % (
+ sys.version_info[0], sys.version_info[1]) # Python version
+ abi_suffix = 'm' if sys.version_info < (
+ 3, 8) else '' # ABI suffix to use for the whl
+ abi_tag = 'cp%d%d%s' % (
+ sys.version_info[0], sys.version_info[1], abi_suffix
+ ) # ABI tag to use
+ # install each package individually
+ for requirement in requirements_to_install:
+ try:
+ # download the bdist compatible with the debian platform
+ # TODO(anandinguva): the platform tag will get updated. Check PEP 600
Review comment:
From offline discussions:
- We can rewrite TODO to make it more actionable (do X why Y is fixed)
- _download_pypi_package currently does not do the command line
- We can likely use the same method for _download_pypi_package and
_download_pypi_sdk_package if the download params are the same.
##########
File path: sdks/python/apache_beam/runners/portability/stager.py
##########
@@ -692,6 +718,46 @@ def _populate_requirements_cache(requirements_file,
cache_dir):
]
_LOGGER.info('Executing command: %s', cmd_args)
processes.check_output(cmd_args, stderr=processes.STDOUT)
+ else: # try to download wheels
+ language_implementation_tag = 'cp'
+ language_version_tag = '%d%d' % (
+ sys.version_info[0], sys.version_info[1]) # Python version
+ abi_suffix = 'm' if sys.version_info < (
+ 3, 8) else '' # ABI suffix to use for the whl
+ abi_tag = 'cp%d%d%s' % (
+ sys.version_info[0], sys.version_info[1], abi_suffix
+ ) # ABI tag to use
+ # install each package individually
+ for requirement in requirements_to_install:
+ try:
+ # download the bdist compatible with the debian platform
+ # TODO(anandinguva): the platform tag will get updated. Check PEP 600
Review comment:
From offline discussion:
- We can rewrite TODO to make it more actionable (do X why Y is fixed)
- _download_pypi_package currently does not do the command line
- We can likely use the same method for _download_pypi_package and
_download_pypi_sdk_package if the download params are the same.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]