Skip to content

Commit

Permalink
Merge pull request #1067 from seemethere/torch_version
Browse files Browse the repository at this point in the history
setup: Add version for torch dependency
  • Loading branch information
seemethere committed Nov 9, 2020
2 parents 7293d43 + 1c181eb commit 9ebfb7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def _export_version(version, sha):

print('-- Building version ' + VERSION)

pytorch_package_version = os.getenv('PYTORCH_VERSION')

pytorch_package_dep = 'torch'
if pytorch_package_version is not None:
pytorch_package_dep += "==" + pytorch_package_version


class clean(distutils.command.clean.clean):
def run(self):
Expand Down Expand Up @@ -82,7 +88,7 @@ def run(self):
license='BSD',

install_requires=[
'tqdm', 'requests', 'torch', 'numpy'
'tqdm', 'requests', pytorch_package_dep, 'numpy'
],
python_requires='>=3.5',
classifiers=[
Expand Down

0 comments on commit 9ebfb7b

Please sign in to comment.