|
1 | | -#!/usr/bin/env python |
2 | | -# -*- coding: utf-8 -*- |
3 | | -import codecs |
| 1 | +#!/usr/bin/env python3 |
| 2 | + |
4 | 3 | import os |
5 | 4 | import re |
6 | | -import sys |
7 | 5 |
|
8 | 6 | from setuptools import setup, find_packages |
9 | 7 |
|
|
12 | 10 | with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_: |
13 | 11 | long_description = file_.read() |
14 | 12 |
|
15 | | -# Get the version |
16 | 13 | version_regex = r'__version__ = ["\']([^"\']*)["\']' |
17 | 14 | with open(os.path.join(PROJECT_ROOT, 'src/hpack/__init__.py')) as file_: |
18 | 15 | text = file_.read() |
19 | 16 | match = re.search(version_regex, text) |
20 | | - |
21 | 17 | if match: |
22 | 18 | version = match.group(1) |
23 | 19 | else: |
24 | 20 | raise RuntimeError("No version number found!") |
25 | 21 |
|
26 | | -# Stealing this from Kenneth Reitz |
27 | | -if sys.argv[-1] == 'publish': |
28 | | - os.system('python setup.py sdist upload') |
29 | | - sys.exit() |
30 | | - |
31 | 22 | setup( |
32 | 23 | name='hpack', |
33 | 24 | version=version, |
|
38 | 29 | |
39 | 30 | url='https://github.com/python-hyper/hpack', |
40 | 31 | packages=find_packages(where="src"), |
41 | | - package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']}, |
| 32 | + package_data={'hpack': []}, |
42 | 33 | package_dir={'': 'src'}, |
43 | 34 | python_requires='>=3.6.1', |
44 | | - include_package_data=True, |
45 | 35 | license='MIT License', |
46 | 36 | classifiers=[ |
47 | 37 | 'Development Status :: 5 - Production/Stable', |
|
52 | 42 | 'Programming Language :: Python :: 3.6', |
53 | 43 | 'Programming Language :: Python :: 3.7', |
54 | 44 | 'Programming Language :: Python :: 3.8', |
| 45 | + 'Programming Language :: Python :: 3.9', |
55 | 46 | 'Programming Language :: Python :: Implementation :: CPython', |
56 | 47 | 'Programming Language :: Python :: Implementation :: PyPy', |
57 | 48 | ], |
|
0 commit comments