From fdc106acd01fcea1c928211ac1aa7aeb1823373a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Jun 2021 21:45:21 -0400 Subject: [PATCH] Initial attempts to clone from the local git repo rather than the remote. Doesn't work due to pypa/pip#10098. --- pytest_perf/runner.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pytest_perf/runner.py b/pytest_perf/runner.py index 8dfe2da..6812438 100644 --- a/pytest_perf/runner.py +++ b/pytest_perf/runner.py @@ -2,6 +2,7 @@ import re import subprocess import contextlib +import pathlib import pip_run import tempora @@ -93,10 +94,9 @@ def eval(self, cmd, **kwargs): def upstream_url(extras=''): """ + This URL doesn't work because of pypa/pip@10098 >>> upstream_url() - 'pytest-perf@git+https://github.com/jaraco/pytest-perf' + 'pytest-perf@git+file://...pytest-perf@main' """ - cmd = ['git', 'remote', 'get-url', 'origin'] - origin = subprocess.check_output(cmd, **_text).strip() - base, sep, name = origin.rpartition('/') - return f'{name}{extras}@git+{origin}' + here = pathlib.Path.cwd() + return f'{here.stem}{extras}@git+file://{here}@main'