Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce duplication of dependency information #308

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Tensorflow AVX check is made optional in API and is disabled by default (<https://github.com/openvinotoolkit/datumaro/pull/305>)
- Extensions for images in ImageNet_txt are now mandatory (<https://github.com/openvinotoolkit/datumaro/pull/302>)
- Several dependencies now have lower bounds (<https://github.com/openvinotoolkit/datumaro/pull/308>)

### Deprecated
-
Expand Down
21 changes: 21 additions & 0 deletions requirements-core.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
attrs>=19.3.0
defusedxml>=0.6.0
GitPython>=3.0.8
lxml>=4.4.1
matplotlib>=3.3.1
numpy>=1.17.3
Pillow>=6.1.0

# Avoid 2.0.2 Linux binary distribution because of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, in requirements.txt we could just use --no-binary, and I'd prefer this solution. But it is not supported in setup.py.

# a conflict in numpy versions with TensorFlow:
# - TF is compiled with numpy 1.19 ABI
# - pycocotools is compiled with numpy 1.20 ABI
# Using a previous version allows to force package rebuilding.
#
# https://github.com/openvinotoolkit/datumaro/issues/253
pycocotools>=2.0.0,!=2.0.2; platform_system != "Windows"

pycocotools-windows; platform_system == "Windows"
PyYAML>=5.3.1
scikit-image>=0.15.0
tensorboardX>=1.8
11 changes: 1 addition & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
attrs>=19.3.0
Cython>=0.27.3 # include before pycocotools
defusedxml>=0.6.0
GitPython>=3.0.8
lxml>=4.4.1
matplotlib>=3.3.1
-r requirements-core.txt --no-binary=pycocotools # https://github.com/openvinotoolkit/datumaro/issues/253
opencv-python-headless>=4.1.0.25
Pillow>=6.1.0
pycocotools>=2.0.0 --no-binary=pycocotools # https://github.com/openvinotoolkit/datumaro/issues/253
PyYAML>=5.3.1
scikit-image>=0.15.0
tensorboardX>=1.8
pandas>=1.1.5
pytest>=5.3.5
26 changes: 3 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (C) 2019-2020 Intel Corporation
# Copyright (C) 2019-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -34,29 +34,9 @@ def find_version(project_dir=None):
return version

def get_requirements():
requirements = [
'attrs>=19.3.0',
'defusedxml',
'GitPython',
'lxml',
'matplotlib',
'numpy>=1.17.3',
'Pillow',
with open('requirements-core.txt') as fh:
requirements = [fh.read()]

# Avoid 2.0.2 Linux binary distribution because of
# a conflict in numpy versions with TensorFlow:
# - TF is compiled with numpy 1.19 ABI
# - pycocotools is compiled with numpy 1.20 ABI
# Using a previous version allows to force package rebuilding.
#
# https://github.com/openvinotoolkit/datumaro/issues/253
'pycocotools!=2.0.2; platform_system != "Windows"',
'pycocotools-windows; platform_system == "Windows"',

'PyYAML',
'scikit-image',
'tensorboardX',
]
if strtobool(os.getenv('DATUMARO_HEADLESS', '0').lower()):
requirements.append('opencv-python-headless')
else:
Expand Down