<commit_before>#!/usr/bin/env python
"""
Build script for zanata-python-client
"""
from setuptools import setup, find_packages
import os
import subprocess

path = os.path.dirname(os.path.realpath(__file__))
version_file = os.path.join(path, 'zanataclient/VERSION-FILE')
version_gen = os.path.join(path, 'VERSION-GEN')

p = subprocess.Popen(version_gen, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,  close_fds=True)
output = p.stdout.readline()
number = output[:-1].strip('version: ')
"""
    file = open(version_file, 'rb')
    client_version = file.read()
    file.close()
    number = client_version[:-1].strip('version: ')
"""
subprocess.Popen("""
cat << EOF > MANIFEST.in
include zanataclient/VERSION-FILE
EOF
""", shell=True)

setup (name = "zanata-python-client",
    version = number,
    packages = find_packages(),
    install_requires=[
        'polib' ,
        'httplib2'
    ],
    description = "Zanata Python Client.",
    author = '<NAME>',
    author_email = '<EMAIL>',
    license = 'LGPLv2+',
    platforms=["Linux"],
    scripts = ["zanata","flies"],
    
    #entry_points = {
	#'console_scripts': [
	#	'zanata = zanataclient.zanata:main',
	#]
    #},

    classifiers=['License :: OSI Approved ::  GNU Lesser General Public License (LGPL)',
                 'Operating System :: Unix',
                 'Programming Language :: Python',<commit_msg>Add a check for VERSION-FILE and read version number from VERSION-FILE if VERSION-GEN failed<commit_after>#!/usr/bin/env python
"""
Build script for zanata-python-client
"""
from setuptools import setup, find_packages
import os
import subprocess

path = os.path.dirname(os.path.realpath(__file__))
version_file = os.path.join(path, 'zanataclient/VERSION-FILE')
version_gen = os.path.join(path, 'VERSION-GEN')

p = subprocess.Popen(version_gen, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,  close_fds=True)
output = p.stdout.readline()
number = output[:-1].strip('version: ')

if not number and os.path.exists(version_file):
    file = open(version_file, 'rb')
    client_version = file.read()
    file.close()
    number = client_version[:-1].strip('version: ')

subprocess.Popen("""
cat << EOF > MANIFEST.in
include zanataclient/VERSION-FILE
EOF
""", shell=True)

setup (name = "zanata-python-client",
    version = number,
    packages = find_packages(),
    install_requires=[
        'polib' ,
        'httplib2'
    ],
    description = "Zanata Python Client.",
    author = '<NAME>',
    author_email = '<EMAIL>',
    license = 'LGPLv2+',
    platforms=["Linux"],
    scripts = ["zanata","flies"],
    
    #entry_points = {
	#'console_scripts': [
	#	'zanata = zanataclient.zanata:main',
	#]
    #},

    classifiers=['License :: OSI Approved ::  GNU Lesser General Public License (LGPL)',
                 'Operating System :: Unix',
                 'Programming Language :: Python',
{'fraction_non_alphanumeric': 0.1536892213532812, 'fraction_numerical': 0.0027201632097925877, 'mean_word_length': 3.7451612903225806, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7158705', 'n_tokens_mistral': 1000, 'n_tokens_neox': 980, 'n_words': 201}