-
Notifications
You must be signed in to change notification settings - Fork 57
/
setup.py
61 lines (49 loc) · 1.48 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
61
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
install_requires = [
"cryptography==36.0.1",
"rsa==4.8",
"pyOpenSSL==21.0.0",
"brotli",
"hpack==4.0.0",
]
test_requirements = [
"pytest>=3",
]
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, because outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
packages = find_packages()
setup(
name = "pyhttpx",
version = "2.10.2",
keywords = ["pip", "pyhttpx"],
description = "HTTP library.",
long_description = "HTTP library, TLS supported version:tls1.2/tls1.3, HTTP supported version: http1.1/http2",
license = "MIT Licence",
url = "https://github.com/zero3301/pyhttpx",
author = "3301",
author_email = "1114135928@qq.com",
package_dir={"pyhttpx": "pyhttpx"},
zip_safe=False,
# package_data={
# # 包含文件后缀,必须包含include_package_data = False,或者使用MANIFEST.in构建
# '': ['*.pyd', '*.so']},
packages = packages,
include_package_data = True,
platforms = "any",
install_requires = install_requires,
cmdclass={'test': PyTest},
tests_require=test_requirements,
)
#打包
#python setup.py sdist
#twine upload dist/pyhttpx-1.3.27.tar.gz