<commit_before>from setuptools import setup, find_packages
import os
import sys
import versioneer  # https://github.com/warner/python-versioneer

if sys.argv[-1] == 'pyuic':
    indir = 'designer'
    outdir = 'ibeatles/interfaces'
    files = os.listdir(indir)
    files = [os.path.join('designer', item) for item in files]
    files = [item for item in files if item.endswith('.ui')]

    done = 0
    for inname in files:
        outname = inname.replace('.ui', '.py')
        outname = outname.replace(indir, outdir)
        if os.path.exists(outname):
            if os.stat(inname).st_mtime < os.stat(outname).st_mtime:
                continue
        print("Converting '%s' to '%s'" % (inname, outname))
        command = "pyuic4 %s -o %s"  % (inname, outname)
        os.system(command)
        done += 1
    if not done:
        print("Did not convert any '.ui' files")
    sys.exit(0)

setup(name="iBeatles",
      version=versioneer.get_version(),
      cmdclass=versioneer.get_cmdclass(),
      description = "Bragg Edge Fitting and Strain Calculator",
      author = "Jean",
      author_email = "<EMAIL>",
      url = "http://github.com/ornlneutronimaging/iBeatles",
      long_description = """Should have a longer description""",
      license = "The MIT License (MIT)",
      scripts=["scripts/ibeatles"],
      packages=find_packages(),
      package_dir={},
      install_requires=['numpy','matplotlib'],
      setup_requires=[],
)<commit_msg>Trying to add icons_rc builder in setup.py script<commit_after>from setuptools import setup, find_packages
import os
import sys
import versioneer  # https://github.com/warner/python-versioneer

if sys.argv[-1] == 'pyuic':
    indir = 'designer'
    outdir = 'ibeatles/interfaces'
    files = os.listdir(indir)
    files = [os.path.join('designer', item) for item in files]
    files = [item for item in files if item.endswith('.ui')]

    done = 0
    for inname in files:
        outname = inname.replace('.ui', '.py')
        outname = outname.replace(indir, outdir)
        if os.path.exists(outname):
            if os.stat(inname).st_mtime < os.stat(outname).st_mtime:
                continue
        print("Converting '%s' to '%s'" % (inname, outname))
        command = "pyuic4 %s -o %s"  % (inname, outname)
        os.system(command)
        done += 1
    if not done:
        print("Did not convert any '.ui' files")
    sys.exit(0)

if sys.argv[-1] == 'pyrcc4':
    infile = 'ibeatles/icons/icon.qrc'
    outfile = 'ibeatles/interfaces/icons_rc.py'
    print("Converting icons_rc file")
    command = "pyrcc4 -o %s %s" % (outfile, infile)
    os.system(command)

setup(name="iBeatles",
      version=versioneer.get_version(),
      cmdclass=versioneer.get_cmdclass(),
      description = "Bragg Edge Fitting and Strain Calculator",
      author = "Jean",
      author_email = "<EMAIL>",
      url = "http://github.com/ornlneutronimaging/iBeatles",
      long_description = """Should have a longer description""",
      license = "The MIT License (MIT)",
      scripts=["scripts/ibeatles"],
      packages=find_packages(),
      package_dir={},
      install_requires=['numpy','matplotlib'],
      setup_requires=[],
)
{'fraction_non_alphanumeric': 0.1412907268170426, 'fraction_numerical': 0.004072681704260651, 'mean_word_length': 2.879708383961118, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6374137', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1038, 'n_words': 249}