Bug 1858509 add thread-safety annotations around MediaSourceDemuxer::mMonitor r=alwu
[gecko.git] / third_party / python / frozenlist / setup.py
blob9d0e26fcb57adfed5723548e64a3c68b853dcefa
1 import os
2 import pathlib
3 import re
4 import sys
6 from setuptools import Extension, setup
8 if sys.version_info < (3, 6):
9 raise RuntimeError("frozenlist 1.x requires Python 3.6+")
12 NO_EXTENSIONS = (
13 bool(os.environ.get('FROZENLIST_NO_EXTENSIONS')) or
14 sys.implementation.name != "cpython"
17 here = pathlib.Path(__file__).parent
19 if NO_EXTENSIONS:
20 print("*********************")
21 print("* Pure Python build *")
22 print("*********************")
23 ext_modules = None
24 else:
25 print("**********************")
26 print("* Accellerated build *")
27 print("**********************")
28 ext_modules = [
29 Extension('frozenlist._frozenlist', ['frozenlist/_frozenlist.c'])
33 txt = (here / 'frozenlist' / '__init__.py').read_text('utf-8')
34 try:
35 version = re.findall(r"^__version__ = '([^']+)'\r?$",
36 txt, re.M)[0]
37 except IndexError:
38 raise RuntimeError('Unable to determine version.')
40 install_requires = []
43 def read(f):
44 return (here / f).read_text('utf-8').strip()
47 setup(
48 name='frozenlist',
49 version=version,
50 description=(
51 'A list-like structure which implements '
52 'collections.abc.MutableSequence'
54 long_description='\n\n'.join((read('README.rst'), read('CHANGES.rst'))),
55 long_description_content_type="text/x-rst",
56 classifiers=[
57 'License :: OSI Approved :: Apache Software License',
58 'Intended Audience :: Developers',
59 'Programming Language :: Python',
60 'Programming Language :: Python :: 3',
61 'Programming Language :: Python :: 3.6',
62 'Programming Language :: Python :: 3.7',
63 'Programming Language :: Python :: 3.8',
64 'Programming Language :: Python :: 3.9',
65 'Development Status :: 5 - Production/Stable',
66 'Operating System :: POSIX',
67 'Operating System :: MacOS :: MacOS X',
68 'Operating System :: Microsoft :: Windows',
70 author='Nikolay Kim',
71 author_email='fafhrd91@gmail.com',
72 maintainer='Martijn Pieters <mj@zopatista.com>',
73 maintainer_email='aio-libs@googlegroups.com',
74 url='https://github.com/aio-libs/frozenlist',
75 project_urls={
76 'Chat: Gitter': 'https://gitter.im/aio-libs/Lobby',
77 'CI: Github Actions':
78 'https://github.com/aio-libs/frozenlist/actions',
79 'Coverage: codecov': 'https://codecov.io/github/aio-libs/frozenlist',
80 'Docs: RTD': 'https://frozenlist.readthedocs.io',
81 'GitHub: issues': 'https://github.com/aio-libs/frozenlist/issues',
82 'GitHub: repo': 'https://github.com/aio-libs/frozenlist',
84 license='Apache 2',
85 packages=['frozenlist'],
86 ext_modules=ext_modules,
87 python_requires='>=3.6',
88 install_requires=install_requires,
89 include_package_data=True,