|
1 | | -#!/usr/bin/env python |
2 | | -# -*- coding: utf-8 -*- |
3 | | -import os |
4 | | -import re |
| 1 | +from setuptools import setup # type: ignore[import] |
5 | 2 |
|
6 | | -from setuptools import setup, find_packages # type: ignore[import] |
7 | | - |
8 | | - |
9 | | -PROJECT_ROOT = os.path.dirname(__file__) |
10 | | - |
11 | | -with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_: |
12 | | - long_description = file_.read() |
13 | | -long_description += '\n\n' |
14 | | -with open(os.path.join(PROJECT_ROOT, 'HISTORY.rst')) as file_: |
15 | | - long_description += file_.read() |
16 | | - |
17 | | -# Get the version |
18 | | -version_regex = r'__version__ = ["\']([^"\']*)["\']' |
19 | | -with open(os.path.join(PROJECT_ROOT, 'src/priority/__init__.py')) as file_: |
20 | | - text = file_.read() |
21 | | - match = re.search(version_regex, text) |
22 | | - |
23 | | - if match: |
24 | | - version = match.group(1) |
25 | | - else: |
26 | | - raise RuntimeError("No version number found!") |
27 | | - |
28 | | -setup( |
29 | | - name='priority', |
30 | | - version=version, |
31 | | - description='A pure-Python implementation of the HTTP/2 priority tree', |
32 | | - long_description=long_description, |
33 | | - long_description_content_type='text/x-rst', |
34 | | - author='Cory Benfield', |
35 | | - author_email='cory@lukasa.co.uk', |
36 | | - url='https://github.com/python-hyper/priority/', |
37 | | - project_urls={ |
38 | | - 'Documentation': 'https://python-hyper.org/projects/priority/', |
39 | | - 'Source': 'https://github.com/python-hyper/priority/', |
40 | | - 'Tracker': 'https://github.com/python-hyper/priority/issues', |
41 | | - 'Changelog': 'https://github.com/python-hyper/priority/blob/master/HISTORY.rst', |
42 | | - }, |
43 | | - packages=find_packages(where='src'), |
44 | | - package_data={ |
45 | | - '': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst'] |
46 | | - }, |
47 | | - package_dir={'': 'src'}, |
48 | | - python_requires='>=3.6.1', |
49 | | - include_package_data=True, |
50 | | - license='MIT License', |
51 | | - classifiers=[ |
52 | | - 'Development Status :: 5 - Production/Stable', |
53 | | - 'Intended Audience :: Developers', |
54 | | - 'License :: OSI Approved :: MIT License', |
55 | | - 'Programming Language :: Python', |
56 | | - 'Programming Language :: Python :: 3', |
57 | | - 'Programming Language :: Python :: 3.6', |
58 | | - 'Programming Language :: Python :: 3.7', |
59 | | - 'Programming Language :: Python :: 3.8', |
60 | | - 'Programming Language :: Python :: 3.9', |
61 | | - 'Programming Language :: Python :: Implementation :: CPython', |
62 | | - 'Programming Language :: Python :: Implementation :: PyPy', |
63 | | - ], |
64 | | - extras_require={ |
65 | | - "mypy": ["mypy>=0.812"], |
66 | | - }, |
67 | | -) |
| 3 | +setup() |
0 commit comments