<commit_before>import setuptools
import os, sys, shutil
import versioneer


# store the source JSON in `share/xyzservices`
try:
    datadir = os.path.join(sys.prefix, "share", "xyzservices")
    if not os.path.exists(datadir):
        os.makedirs(datadir)

    shutil.copyfile(
        "./xyzservices/data/providers.json",
        os.path.join(datadir, "providers.json"),
    )
except Exception:
    pass


with open("README.md", "r", encoding="utf8") as fh:
    long_description = fh.read()

setuptools.setup(
    name="xyzservices",
    description="Source of XYZ tiles providers",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/geopandas/xyzservices",
    author="<NAME>, <NAME>",
    author_email="<EMAIL>, <EMAIL>",
    license="3-Clause BSD",
    packages=setuptools.find_packages(),
    python_requires=">=3.7",
    include_package_data=True,
    package_data={
        "xyzservices": ["data/providers.json"],
    },
    classifiers=[
        "License :: OSI Approved :: BSD License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3 :: Only",
    ],
    version=versioneer.get_version(),
    cmdclass=versioneer.get_cmdclass(),
)
<commit_msg>REF: use data_files to manage providers.json (#55)<commit_after>import setuptools
import versioneer


with open("README.md", "r", encoding="utf8") as fh:
    long_description = fh.read()

setuptools.setup(
    name="xyzservices",
    description="Source of XYZ tiles providers",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/geopandas/xyzservices",
    author="<NAME>, <NAME>",
    author_email="<EMAIL>, <EMAIL>",
    license="3-Clause BSD",
    packages=setuptools.find_packages(),
    python_requires=">=3.7",
    include_package_data=True,
    package_data={
        "xyzservices": ["data/providers.json"],
    },
    classifiers=[
        "License :: OSI Approved :: BSD License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3 :: Only",
    ],
    version=versioneer.get_version(),
    cmdclass=versioneer.get_cmdclass(),
    data_files=[("share/xyzservices", ["xyzservices/data/providers.json"])],
)

{'fraction_non_alphanumeric': 0.15004191114836546, 'fraction_numerical': 0.0075440067057837385, 'mean_word_length': 3.680392156862745, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 13, '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': '690392', 'n_tokens_mistral': 778, 'n_tokens_neox': 744, 'n_words': 144}