<commit_before># Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.

#from ez_setup import use_setuptools

#use_setuptools()

import glob
from distutils.core import setup , run_setup

#from setuptools import setup, find_packages
#from setuptools.command import test
#from setuptools.command.install import install

import sys
import os

keyw = """\
"""

datadir = os.path.join("share", "pyjamas")

bp_data_files = glob.glob(os.path.join("builder", "boilerplate", "*"))
test_files = glob.glob(os.path.join("pyjs", "tests", "*"))
stub_files = glob.glob(os.path.join("stubs", "*"))
addons_data_files = glob.glob(os.path.join("addons", "*.py"))

data_files = [
    (os.path.join(datadir, "builder", "boilerplate"), bp_data_files),
    (os.path.join(datadir, "pyjs", "tests"), test_files),
    (os.path.join(datadir, "stubs"), stub_files),
    (os.path.join(datadir, "addons"), addons_data_files)
]

# main purpose of this function is to exclude "output" which
# could have been built by a developer.
def get_files(d):
    res = []
    for p in glob.glob(os.path.join(d, "*")):
        if not p:
            continue
        (pth, fname) = os.path.split(p)
        if fname == "output":
            continue
        if fname[-4:] == ".pyc": # ehmm.. noooo.
            continue 
        if os.path.isdir(p):
            get_dir(p)
        else:
            res.append(p)
    return res

def get_dir(dirname):
    for d in glob.glob("%s/*" % dirname):
        if os.path.isdir(d):
            (pth, fname) = os.path.split(d)
            expath = get_files(d)
            pth = os.path.join(os.path.join(datadir, dirname), fname)
            data_files.append((pth, expath))
        else:
            data_files.append((os.path.join(datadir, dirname), [d]))

# recursively grab the library and the examples subdirectories - all contents
get_dir("library")
get_dir("examples")

#from pprint import pprint
#pprint(data_files)

import distutils.core
print dir(distutils.core)

if __name__ == '__main__':

    print >> sys.stderr, """
    Have you run bootstrap.py to create bin/pyjsbuild
    and bin/pyjscompile?<commit_msg>add pyjs/src/pyjs to /usr/share/pyjamas on setup install<commit_after># Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.

#from ez_setup import use_setuptools

#use_setuptools()

import glob
from distutils.core import setup , run_setup

#from setuptools import setup, find_packages
#from setuptools.command import test
#from setuptools.command.install import install

import sys
import os

keyw = """\
"""

datadir = os.path.join("share", "pyjamas")

bp_data_files = glob.glob(os.path.join("builder", "boilerplate", "*"))
test_files = glob.glob(os.path.join("pyjs", "tests", "*"))
stub_files = glob.glob(os.path.join("stubs", "*"))
addons_data_files = glob.glob(os.path.join("addons", "*.py"))

data_files = [
    (os.path.join(datadir, "builder", "boilerplate"), bp_data_files),
    (os.path.join(datadir, "pyjs", "tests"), test_files),
    (os.path.join(datadir, "stubs"), stub_files),
    (os.path.join(datadir, "addons"), addons_data_files)
]

# main purpose of this function is to exclude "output" which
# could have been built by a developer.
def get_files(d):
    res = []
    for p in glob.glob(os.path.join(d, "*")):
        if not p:
            continue
        (pth, fname) = os.path.split(p)
        if fname == "output":
            continue
        if fname[-4:] == ".pyc": # ehmm.. noooo.
            continue 
        if os.path.isdir(p):
            get_dir(p)
        else:
            res.append(p)
    return res

def get_dir(dirname):
    for d in glob.glob("%s/*" % dirname):
        if os.path.isdir(d):
            (pth, fname) = os.path.split(d)
            expath = get_files(d)
            pth = os.path.join(os.path.join(datadir, dirname), fname)
            data_files.append((pth, expath))
        else:
            data_files.append((os.path.join(datadir, dirname), [d]))

# recursively grab the library and the examples subdirectories - all contents
get_dir("library")
get_dir("examples")

# likewise pyjs/src/pyjs
get_dir(os.path.join("pyjs", "src", "pyjs"))

#from pprint import pprint
#pprint(data_files)

import distutils.core
print dir(distutils.core)

if __name__ == '__main__':

    print >> sys.stderr, """
    Have you run bootstrap.py to create bin/pyjsbuild
    and bin/pyjscompile?
{'fraction_non_alphanumeric': 0.14748858447488583, 'fraction_numerical': 0.00410958904109589, 'mean_word_length': 3.1136150234741784, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, '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': '6592588', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1533, 'n_words': 364}