<commit_before>from setuptools import setup, Command, find_packages

import glob
import os.path
import os
import sys


curdir = os.getcwd()
sys.path.append(curdir)

import anyconfig

PACKAGE = "anyconfig"
VERSION = anyconfig.VERSION

# For daily snapshot versioning mode:
if os.environ.get("_SNAPSHOT_BUILD", None) is not None:
    import datetime
    VERSION = VERSION + datetime.datetime.now().strftime(".%Y%m%d")


def list_filepaths(tdir):
    return [f for f in glob.glob(os.path.join(tdir, '*')) if os.path.isfile(f)]


data_files = [("share/man/man1", list_filepaths("docs/"))]


class SrpmCommand(Command):

    user_options = []

    build_stage = "s"
    cmd_fmt = """rpmbuild -b%(build_stage)s \
        --define \"_topdir %(rpmdir)s\" \
        --define \"_sourcedir %(rpmdir)s\" \
        --define \"_buildroot %(BUILDROOT)s\" \
        %(rpmspec)s<commit_msg>do not refer anyconfig.VERSION in setup.py, copy that value instead in it<commit_after>from setuptools import setup, Command, find_packages

import glob
import os.path
import os


curdir = os.getcwd()

PACKAGE = "anyconfig"
VERSION = "0.0.5"  # see anyconfig.globals.VERSION

# For daily snapshot versioning mode:
if os.environ.get("_SNAPSHOT_BUILD", None) is not None:
    import datetime
    VERSION = VERSION + datetime.datetime.now().strftime(".%Y%m%d")


def list_filepaths(tdir):
    return [f for f in glob.glob(os.path.join(tdir, '*')) if os.path.isfile(f)]


data_files = [("share/man/man1", list_filepaths("docs/"))]


class SrpmCommand(Command):

    user_options = []

    build_stage = "s"
    cmd_fmt = """rpmbuild -b%(build_stage)s \
        --define \"_topdir %(rpmdir)s\" \
        --define \"_sourcedir %(rpmdir)s\" \
        --define \"_buildroot %(BUILDROOT)s\" \
        %(rpmspec)s
{'fraction_non_alphanumeric': 0.14921171171171171, 'fraction_numerical': 0.002815315315315315, 'mean_word_length': 3.49873417721519, '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': '1802908', 'n_tokens_mistral': 651, 'n_tokens_neox': 634, 'n_words': 147}