-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·60 lines (57 loc) · 1.63 KB
/
setup.py
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
#!/bin/env python3
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (C) 2022 Sean Anderson <[email protected]>
import os
import setuptools
import setuptools.command.build_ext
class build_ext(setuptools.command.build_ext.build_ext):
def build_extension(self, ext):
if self.compiler.compiler_type == 'msvc':
ext.extra_compile_args = ["/std:c11"]
else:
ext.extra_compile_args = ["-Wno-missing-braces"]
super().build_extension(ext)
setuptools.setup(
name = 'mpmetrics',
use_scm_version = True,
description = "Multiprocess-safe metrics",
long_description = open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),
long_description_content_type = 'text/markdown',
author = 'Sean Anderson',
author_email = '[email protected]',
url = 'https://github.com/Forty-Bot/mpmetrics',
python_requires = ">=3.9",
packages = ['mpmetrics'],
cmdclass = {'build_ext': build_ext},
ext_modules = [
setuptools.Extension(
'_mpmetrics',
['_mpmetrics.c', 'atomic.c', 'lock.c'],
),
],
license = 'LGPL-3.0-only',
license_files = [
'COPYING',
'LICENSES/*',
],
setup_requires = ['setuptools_scm'],
install_requires = [
'prometheus_client',
],
extras_require = {
"doc": [
'sphinx',
'sphinx-rtd-theme',
],
"flask": [
'prometheus_flask_exporter',
],
"tests": [
'flask',
'freezegun',
'hypothesis',
'prometheus_flask_exporter',
'pytest',
],
},
)