Commit b5a7c5f9 authored by ptrblck's avatar ptrblck Committed by mcarilli
Browse files

add WAR for pip>=19.3.1 (#652)

* add WAR for pip>=19.3.1

* remove pipmain, use extras_require instead
parent 0ce8ad3e
......@@ -2,7 +2,6 @@ import torch
from setuptools import setup, find_packages
import subprocess
from pip._internal import main as pipmain
import sys
import warnings
import os
......@@ -31,10 +30,11 @@ if TORCH_MAJOR == 0 and TORCH_MINOR < 4:
cmdclass = {}
ext_modules = []
extras = {}
if "--pyprof" in sys.argv:
with open('requirements.txt') as f:
required_packages = f.read().splitlines()
pipmain(["install"] + required_packages)
extras['pyprof'] = required_packages
try:
sys.argv.remove("--pyprof")
except:
......@@ -209,4 +209,5 @@ setup(
description='PyTorch Extensions written by NVIDIA',
ext_modules=ext_modules,
cmdclass=cmdclass,
extras_require=extras,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment