forked from dromara/domain-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·115 lines (91 loc) · 3.12 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# -*- coding: utf-8 -*-
# @Date : 2019-06-26
# @Author : Peng Shiyu
from __future__ import print_function, unicode_literals, absolute_import, division
import glob
import io
import os
from setuptools import setup, find_packages
"""
## 本地测试
安装测试
python setup.py develop
python setup.py develop --uninstall
卸载
pip uninstall spideradmin -y
## 打包上传
先升级打包工具
pip install --upgrade setuptools wheel twine
打包
python setup.py sdist bdist_wheel
检查
twine check dist/*
上传pypi
twine upload dist/*
命令整合
rm -rf dist build *.egg-info \
&& python setup.py sdist bdist_wheel \
&& twine check dist/* \
&& twine upload dist/*
## 下载测试
安装测试
pip3 install -U domain-admin -i https://pypi.org/simple
打包的用的setup必须引入
参考:
https://packaging.python.org/guides/making-a-pypi-friendly-readme/
"""
# 版本号
version_file = glob.glob("*/version.py")[0]
with io.open(version_file, 'rb') as f:
version_var = {}
exec(f.read(), version_var)
VERSION = version_var['VERSION']
with io.open("README.md", 'r', encoding='utf-8') as f:
long_description = f.read()
with io.open("requirements/production.txt", 'r') as f:
install_requires = f.read().split(os.sep)
setup(
name='domain-admin',
version=VERSION,
description="a domain ssl cert admin",
keywords='domain,ssl,cert,web,monitor',
author='Peng Shiyu',
author_email='[email protected]',
license='MIT',
url="https://github.com/dromara/domain-admin",
long_description=long_description,
long_description_content_type='text/markdown',
platforms=['any'],
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
# 'Programming Language :: Python :: 3.13',
# 'Programming Language :: Python :: 3.14',
# 'Programming Language :: Python :: 3.15',
# 'Programming Language :: Python :: 999.99',
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=find_packages(),
include_package_data=True,
zip_safe=True,
install_requires=install_requires
)