1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
# -*- coding:utf-8 -*-
# ************************** Copyrights and license ***************************
#
# This file is part of gcovr 7.2, a parsing and reporting tool for gcov.
# https://gcovr.com/en/stable
#
# _____________________________________________________________________________
#
# Copyright (c) 2013-2024 the gcovr authors
# Copyright (c) 2013 Sandia Corporation.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# This software is distributed under the 3-clause BSD License.
# For more information, see the README.rst file.
#
# ****************************************************************************
"""
Script to generate the installer for gcovr.
"""
from runpy import run_path
from setuptools import setup, find_packages
from os import path
import re
version = run_path("./gcovr/version.py")["__version__"]
# read the contents of your README file
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
long_description = re.sub(
r"^\.\. image:: \./",
r".. image:: https://raw.githubusercontent.com/gcovr/gcovr/{}/".format(version),
long_description,
flags=re.MULTILINE,
)
long_description = re.sub(
r":option:`(.*?)<gcovr.*?>`", r"``\1``", long_description, flags=re.MULTILINE
)
setup(
name="gcovr",
version=version,
long_description=long_description,
long_description_content_type="text/x-rst",
platforms=["any"],
python_requires=">=3.8",
packages=find_packages(include=["gcovr*"], exclude=["gcovr.tests"]),
install_requires=[
"jinja2",
"lxml",
"colorlog",
"pygments>=2.13.0",
"tomli >= 1.1.0 ; python_version < '3.11'",
],
package_data={
"gcovr": [
"formats/html/*/*.css",
"formats/html/*/*.html",
"formats/html/*/pygments.*",
],
},
entry_points={
"console_scripts": [
"gcovr=gcovr.__main__:main",
],
},
)
|