aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorambrosin <ambrosin@google.com>2023-04-14 01:46:10 -0700
committerCopybara-Service <copybara-worker@google.com>2023-04-14 01:47:07 -0700
commit69986c1487745ad19851723f9c579dec2e007716 (patch)
tree9ce9be1125db8e42d868d17cb7dbd7a5cc473584 /python
parentcb47f505602515e63e64c014e479e1bff8b37fb5 (diff)
downloadtink-69986c1487745ad19851723f9c579dec2e007716.tar.gz
Update setup.py to account for the fact that tink-cc-{aws,gcp}kms are no longer dependencies.
PiperOrigin-RevId: 524229076
Diffstat (limited to 'python')
-rw-r--r--python/setup.py59
1 files changed, 6 insertions, 53 deletions
diff --git a/python/setup.py b/python/setup.py
index 5de2a216b..7882df6fc 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -140,19 +140,11 @@ def _patch_workspace(workspace_content):
def _patch_with_local_path(workspace_content, base_path):
"""Replaces the base paths in the local_repository() rules."""
-
- workspace_content = re.sub(r'(?<="tink_cc",\n path = ").*(?=\n)',
- base_path + '/cc", # Modified by setup.py',
- workspace_content)
- workspace_content = re.sub(
- r'(?<="tink_cc_awskms",\n path = ").*(?=\n)',
- base_path + '/cc/integration/awskms", # Modified by setup.py',
- workspace_content)
- workspace_content = re.sub(
- r'(?<="tink_cc_gcpkms",\n path = ").*(?=\n)',
- base_path + '/cc/integration/gcpkms", # Modified by setup.py',
- workspace_content)
- return workspace_content
+ return re.sub(
+ r'(?<="tink_cc",\n path = ").*(?=\n)',
+ base_path + '/cc", # Modified by setup.py',
+ workspace_content,
+ )
def _patch_with_http_archive(workspace_content, filename, prefix):
@@ -172,22 +164,6 @@ def _patch_with_http_archive(workspace_content, filename, prefix):
)
''')
- cc_awskms = textwrap.dedent(
- '''\
- local_repository(
- name = "tink_cc_awskms",
- path = "../cc/integration/awskms",
- )
- ''')
-
- cc_gcpkms = textwrap.dedent(
- '''\
- local_repository(
- name = "tink_cc_gcpkms",
- path = "../cc/integration/gcpkms",
- )
- ''')
-
cc_patched = textwrap.dedent(
'''\
# Modified by setup.py
@@ -198,30 +174,7 @@ def _patch_with_http_archive(workspace_content, filename, prefix):
)
'''.format(filename, prefix))
- cc_awskms_patched = textwrap.dedent(
- '''\
- # Modified by setup.py
- http_archive(
- name = "tink_cc_awskms",
- urls = ["https://github.com/google/tink/archive/{}"],
- strip_prefix = "{}/cc/integration/awskms",
- )
- '''.format(filename, prefix))
-
- cc_gcpkms_patched = textwrap.dedent(
- '''\
- # Modified by setup.py
- http_archive(
- name = "tink_cc_gcpkms",
- urls = ["https://github.com/google/tink/archive/{}"],
- strip_prefix = "{}/cc/integration/gcpkms",
- )
- '''.format(filename, prefix))
-
- workspace_content = workspace_content.replace(cc, cc_patched)
- workspace_content = workspace_content.replace(cc_awskms, cc_awskms_patched)
- workspace_content = workspace_content.replace(cc_gcpkms, cc_gcpkms_patched)
- return workspace_content
+ return workspace_content.replace(cc, cc_patched)
class BazelExtension(setuptools.Extension):