Skip to content

Commit 215eeac

Browse files
authored
Nightly Dependency Replacement (#33908)
* probably need to ensure that sanitize_setup and create_build_and_install both submit True as well, but let's see if this works * version_set_dev implies that we will always be working in a dev context, so should pass along dev=True
1 parent 5ebc313 commit 215eeac

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tools/azure-sdk-tools/ci_tools/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def build_packages(
156156
dist_dir = os.path.join(distribution_directory, package_name_in_artifacts)
157157

158158
if is_dev_build:
159-
process_requires(package_root)
159+
process_requires(package_root, True)
160160

161161
new_version = get_dev_version(setup_parsed.version, build_id)
162162

tools/azure-sdk-tools/ci_tools/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def get_base_version(pkg_name: str) -> str:
315315
exit(1)
316316

317317

318-
def process_requires(setup_py_path: str):
318+
def process_requires(setup_py_path: str, is_dev_build: bool = False):
319319
"""
320320
This method processes a setup.py's package requirements to verify if all required packages are available on PyPI.
321321
If any azure sdk package is not available on PyPI then requirement will be updated to refer to the sdk "dev_identifier".
@@ -335,7 +335,7 @@ def process_requires(setup_py_path: str):
335335
pkg_name = req.key
336336
spec = SpecifierSet(str(req).replace(pkg_name, ""))
337337

338-
if not is_required_version_on_pypi(pkg_name, spec):
338+
if not is_required_version_on_pypi(pkg_name, spec) or is_dev_build:
339339
old_req = str(req)
340340
version = get_version_from_repo(pkg_name)
341341
base_version = get_base_version(pkg_name)

tools/azure-sdk-tools/ci_tools/versioning/version_set_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def version_set_dev_main() -> None:
9292
new_version = get_dev_version(target_package.version, build_id)
9393
print("{0}: {1} -> {2}".format(target_package.name, target_package.version, new_version))
9494

95-
process_requires(target_package.setup_filename)
95+
process_requires(target_package.setup_filename, True)
9696
set_version_py(target_package.setup_filename, new_version)
9797
set_dev_classifier(target_package.setup_filename, new_version)
9898
except:

0 commit comments

Comments
 (0)