|
1 | 1 | import os
|
2 |
| -import pathlib |
3 |
| -import re |
4 | 2 | import sys
|
5 | 3 |
|
6 | 4 | from setuptools import Extension, setup
|
7 | 5 |
|
8 |
| -if sys.version_info < (3, 6): |
9 |
| - raise RuntimeError("frozenlist 1.x requires Python 3.6+") |
10 |
| - |
11 |
| - |
12 | 6 | NO_EXTENSIONS = (
|
13 | 7 | bool(os.environ.get('FROZENLIST_NO_EXTENSIONS')) or
|
14 | 8 | sys.implementation.name != "cpython"
|
15 | 9 | )
|
16 | 10 |
|
17 |
| -here = pathlib.Path(__file__).parent |
18 |
| - |
19 | 11 | if NO_EXTENSIONS:
|
20 | 12 | print("*********************")
|
21 | 13 | print("* Pure Python build *")
|
|
30 | 22 | ]
|
31 | 23 |
|
32 | 24 |
|
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.') |
39 |
| - |
40 |
| -install_requires = [] |
41 |
| - |
42 |
| - |
43 |
| -def read(f): |
44 |
| - return (here / f).read_text('utf-8').strip() |
45 |
| - |
46 |
| - |
47 | 25 | setup(
|
48 |
| - name='frozenlist', |
49 |
| - version=version, |
50 |
| - description=( |
51 |
| - 'A list-like structure which implements ' |
52 |
| - 'collections.abc.MutableSequence' |
53 |
| - ), |
54 |
| - long_description=read('README.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.7', |
62 |
| - 'Programming Language :: Python :: 3.8', |
63 |
| - 'Programming Language :: Python :: 3.9', |
64 |
| - 'Programming Language :: Python :: 3.10', |
65 |
| - 'Development Status :: 5 - Production/Stable', |
66 |
| - 'Operating System :: POSIX', |
67 |
| - 'Operating System :: MacOS :: MacOS X', |
68 |
| - 'Operating System :: Microsoft :: Windows', |
69 |
| - ], |
70 |
| - author='Nikolay Kim', |
71 |
| - |
72 |
| - maintainer='Martijn Pieters <[email protected]>', |
73 |
| - maintainer_email='[email protected]', |
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', |
83 |
| - }, |
84 |
| - license='Apache 2', |
85 |
| - packages=['frozenlist'], |
86 | 26 | ext_modules=ext_modules,
|
87 |
| - python_requires='>=3.7', |
88 |
| - install_requires=install_requires, |
89 |
| - include_package_data=True, |
90 |
| - exclude_package_data={"": ["*.c"]}, |
91 | 27 | )
|
0 commit comments