Skip to content

Commit

Permalink
Improve setup routines
Browse files Browse the repository at this point in the history
  • Loading branch information
aleju committed Dec 16, 2018
1 parent 9f1b779 commit f0a7432
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
9 changes: 6 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
include setup.py
include setup.cfg
include LICENSE
include MANIFEST.in
include *.md
include *.txt
include README.md
include checks/README.md
include requirements.txt
recursive-include imgaug *.py *.jpg *.ttf *.png *.json
recursive-include tests *.py
recursive-include test *.py
recursive-include checks *.py
27 changes: 19 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
# Check if OpenCV is installed and raise an error if it is not
# but don't do this if the ReadTheDocs systems tries to install
# the library, as that is configured to mock cv2 anyways
READ_THE_DOCS = (os.environ.get("READTHEDOCS", "False") == "True")
NO_CV2_INSTALLED_CHECK = (os.environ.get("IMGAUG_NO_CV2_INSTALLED_CHECK", "False") == "True")
READ_THE_DOCS = (os.environ.get("READTHEDOCS", "False").lower()
in ["true", "1", "on", "yes"])
NO_CV2_INSTALLED_CHECK = (os.environ.get("IMGAUG_NO_CV2_INSTALLED_CHECK", "False").lower()
in ["true", "1", "on", "yes"])
if not READ_THE_DOCS and not NO_CV2_INSTALLED_CHECK:
try:
import cv2 # pylint: disable=locally-disabled, unused-import, line-too-long
import cv2 # pylint: disable=locally-disabled, unused-import, line-too-long
except ImportError as e:
raise Exception("Could not find package 'cv2' (OpenCV). It cannot be automatically installed, so you will have to manually install it.")
raise Exception(
"Could not find package 'cv2' (OpenCV). Please install it manually, e.g. via: pip install opencv-python"
)

long_description = """A library for image augmentation in machine learning experiments, particularly convolutional neural networks.
Supports augmentation of images and keypoints/landmarks in a variety of different ways."""
long_description = """A library for image augmentation in machine learning experiments, particularly convolutional
neural networks. Supports augmentation of images and keypoints/landmarks in a variety of different ways."""

setup(
name="imgaug",
Expand All @@ -22,11 +26,18 @@
author_email="kontakt@ajung.name",
url="https://github.com/aleju/imgaug",
download_url="https://github.com/aleju/imgaug/archive/0.2.7.tar.gz",
install_requires=["scipy", "scikit-image>=0.11.0", "numpy>=1.7.0", "six", "imageio"],
install_requires=["scipy", "scikit-image>=0.11.0", "numpy>=1.7.0", "six", "imageio", "Pillow", "matplotlib",
"Shapely"],
packages=find_packages(),
include_package_data=True,
package_data={
"": ["LICENSE", "README.md", "requirements.txt"],
"imgaug": ["DejaVuSans.ttf", "quokka.jpg", "quokka_annotations.json", "quokka_depth_map_halfres.png"],
"imgaug.checks": ["README.md"]
},
license="MIT",
description="Image augmentation library for machine learning",
long_description=long_description,
keywords=["augmentation", "image", "deep learning", "neural network", "machine learning"]
keywords=["augmentation", "image", "deep learning", "neural network", "CNN", "machine learning",
"computer vision"]
)

0 comments on commit f0a7432

Please sign in to comment.