<commit_before>#!/usr/bin/env python

from distribute_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages
from glob import glob
import os
from os.path import join
import sys

local_path = os.path.dirname(os.path.abspath(__file__))
# setup.py can be called from outside the rootpy directory
os.chdir(local_path)
sys.path.insert(0, local_path)

# check for custom args
# we should instead extend distutils...
filtered_args = []
release = False
for arg in sys.argv:
    if arg == '--release':
        # --release sets the version number before installing
        release = True
    else:
        filtered_args.append(arg)
sys.argv = filtered_args

ext_modules = []

if os.getenv('ROOTPY_NO_EXT') not in ('1', 'true'):
    from distutils.core import Extension
    import subprocess
    import distutils.sysconfig

    python_lib = os.path.dirname(
                    distutils.sysconfig.get_python_lib(
                        standard_lib=True))

    if 'CPPFLAGS' in os.environ:
        del os.environ['CPPFLAGS']
    if 'LDFLAGS' in os.environ:<commit_msg>add --no-ext option<commit_after>#!/usr/bin/env python

from distribute_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages
from glob import glob
import os
from os.path import join
import sys

local_path = os.path.dirname(os.path.abspath(__file__))
# setup.py can be called from outside the rootpy directory
os.chdir(local_path)
sys.path.insert(0, local_path)

# check for custom args
# we should instead extend distutils...
filtered_args = []
release = False
build_extensions = True
for arg in sys.argv:
    if arg == '--release':
        # --release sets the version number before installing
        release = True
    if arg == '--no-ext':
        build_extensions = False
    else:
        filtered_args.append(arg)
sys.argv = filtered_args

ext_modules = []

if os.getenv('ROOTPY_NO_EXT') not in ('1', 'true') and build_extensions:
    from distutils.core import Extension
    import subprocess
    import distutils.sysconfig

    python_lib = os.path.dirname(
                    distutils.sysconfig.get_python_lib(
                        standard_lib=True))

    if 'CPPFLAGS' in os.environ:
        del os.environ['CPPFLAGS']
    if 'LDFLAGS' in os.environ:
{'fraction_non_alphanumeric': 0.0926892950391645, 'fraction_numerical': 0.0017406440382941688, 'mean_word_length': 3.1573236889692584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5636410', 'n_tokens_mistral': 701, 'n_tokens_neox': 692, 'n_words': 208}