<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (division, absolute_import, unicode_literals,
                        print_function)

import subprocess
import sys

from setuptools import find_packages, setup

import file_metadata

# Check if exiftool is installed.
try:
    out = subprocess.check_output(['exiftool', '-ver'])
    if int(out.split(".", 1)[0]) < 8:
        print('`exiftool` (http://www.sno.phy.queensu.ca/~phil/exiftool/) '
              'version found was less than 8.0. Please update it.')
except (OSError, subprocess.CalledProcessError):
    print('`exiftool` (http://www.sno.phy.queensu.ca/~phil/exiftool/) needs '
          'to be installed and needs to be made available in your PATH.')
    sys.exit(1)

# Check if opencv is installed.
try:
    import cv2  # flake8: noqa (unused import)
except ImportError:
    print("`OpenCV` (http://opencv.org/) or it's python bindings are not "
          "installed or not in your python PATH.")
    sys.exit(1)

with open('requirements.txt') as requirements:
    required = requirements.read().splitlines()

with open('test-requirements.txt') as requirements:
    test_required = requirements.read().splitlines()

if __name__ == "__main__":
    setup(name='file-metadata',
          version=file_metadata.__version__,
          description='Helps to find structured metadata from a given file.',
          author="DrTrigon",<commit_msg>setup: Read VERSION directly<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (division, absolute_import, unicode_literals,
                        print_function)

import os
import subprocess
import sys

from setuptools import find_packages, setup

# Check if exiftool is installed.
try:
    out = subprocess.check_output(['exiftool', '-ver'])
    if int(out.split(".", 1)[0]) < 8:
        print('`exiftool` (http://www.sno.phy.queensu.ca/~phil/exiftool/) '
              'version found was less than 8.0. Please update it.')
except (OSError, subprocess.CalledProcessError):
    print('`exiftool` (http://www.sno.phy.queensu.ca/~phil/exiftool/) needs '
          'to be installed and needs to be made available in your PATH.')
    sys.exit(1)

# Check if opencv is installed.
try:
    import cv2  # flake8: noqa (unused import)
except ImportError:
    print("`OpenCV` (http://opencv.org/) or it's python bindings are not "
          "installed or not in your python PATH.")
    sys.exit(1)

with open('requirements.txt') as requirements:
    required = requirements.read().splitlines()

with open('test-requirements.txt') as requirements:
    test_required = requirements.read().splitlines()

VERSION = open(os.path.join('file_metadata', 'VERSION')).read().strip()

if __name__ == "__main__":
    setup(name='file-metadata',
          version=VERSION,
          description='Helps to find structured metadata from a given file.',
          author="DrTrigon",
{'fraction_non_alphanumeric': 0.13114754098360656, 'fraction_numerical': 0.006830601092896175, 'mean_word_length': 3.3010279001468428, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3556869', 'n_tokens_mistral': 922, 'n_tokens_neox': 895, 'n_words': 249}