fix: file method of requirement installs
This commit is contained in:
@@ -179,9 +179,12 @@ def pep_518_cp35_workaround(package_dir: Path, env: Dict[str, str]) -> None:
|
||||
)
|
||||
|
||||
if requirements:
|
||||
# Workaround for bug when ]>= is present, #421
|
||||
requirements = [r.replace("]", "] ") for r in requirements]
|
||||
call(['pip', 'install'] + requirements, env=env)
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
reqfile = Path(d) / "requirements.txt"
|
||||
with reqfile.open("w") as f:
|
||||
for r in requirements:
|
||||
print(r, file=f)
|
||||
call(['pip', 'install', '-r', str(reqfile)], env=env)
|
||||
|
||||
|
||||
def build(options: BuildOptions) -> None:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import textwrap
|
||||
from . import test_projects
|
||||
from . import utils
|
||||
import os
|
||||
|
||||
basic_project = test_projects.new_c_project(
|
||||
setup_py_add=textwrap.dedent(
|
||||
@@ -51,3 +52,5 @@ def test_pep518(tmp_path):
|
||||
|
||||
assert not (project_dir / "42").exists()
|
||||
assert not (project_dir / "4.1.2").exists()
|
||||
|
||||
assert len(os.listdir(project_dir)) == len(basic_project.files)
|
||||
|
||||
Reference in New Issue
Block a user