Skip to content
Snippets Groups Projects
Commit c0a4c007 authored by Sebastiano Ferraris's avatar Sebastiano Ferraris Committed by Kai Chen
Browse files

Minor: requirements to list in setup to avoid repetitions (#1244)

* requirements to list in setup to avoid repetitions

* minor refactoring
parent 01426722
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,13 @@ def make_cython_ext(name, module, sources):
return extension
def get_requirements(filename='requirements.txt'):
here = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(here, filename), 'r') as f:
requires = [line.replace('\n', '') for line in f.readlines()]
return requires
if __name__ == '__main__':
write_version_py()
setup(
......@@ -146,10 +153,7 @@ if __name__ == '__main__':
license='Apache License 2.0',
setup_requires=['pytest-runner', 'cython', 'numpy'],
tests_require=['pytest'],
install_requires=[
'mmcv>=0.2.10', 'numpy', 'matplotlib', 'six', 'terminaltables',
'pycocotools', 'torch>=1.1', 'imagecorruptions'
],
install_requires=get_requirements(),
ext_modules=[
make_cython_ext(
name='soft_nms_cpu',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment