-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
53 lines (43 loc) · 1.47 KB
/
setup.py
File metadata and controls
53 lines (43 loc) · 1.47 KB
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
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
from os import path as os_path
import time
this_directory = os_path.abspath(os_path.dirname(__file__))
"""帮助[https://www.notion.so/6bade2c6a5f4479f82a4e67eafcebb3a]
上传到anaconda
https://docs.anaconda.com/anacondaorg/user-guide/tasks/work-with-packages/
"""
# 读取文件内容
def read_file(filename):
with open(os_path.join(this_directory, filename), encoding='utf-8') as f:
long_description = f.read()
return long_description
# 获取依赖
def read_requirements(filename):
return [line.strip() for line in read_file(filename).splitlines()
if not line.startswith('#')]
long_description="""
一个分类模型
"""
long_description=read_file("README.md")
setup(
name='tkitClassifierLit', #修改包名字-
version='0.0.0.1.5',
description='一个分类模型',
author='Terry Chan',
author_email='napoler2008@gmail.com',
url='https://github.com/napoler/tkitClassifierLit',
# install_requires=read_requirements('requirements.txt'), # 指定需要安装的依赖
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=[
'pytorch-lightning==1.2.7',
'transformers==4.5.0'
],
packages=['tkitClassifierLit'])
"""
pip freeze > requirements.txt
python3 setup.py sdist
#python3 setup.py install
python3 setup.py sdist upload
"""