Keras-TextClassification/setup.py

66 lines
2.3 KiB
Python
Raw Normal View History

2019-07-05 02:06:50 +08:00
# -*- coding: UTF-8 -*-
# !/usr/bin/python
# @time :2019/6/13 10:17
# @author :Mo
# @function :setup of Keras-TextClassification
# @codes :copy reference from https://github.com/TianWenQAQ/Kashgari/blob/master/setup.py
2019-10-11 16:41:35 +08:00
2019-07-05 02:06:50 +08:00
from setuptools import find_packages, setup
import pathlib
import codecs
2019-10-11 16:41:35 +08:00
2019-07-05 02:06:50 +08:00
# Package meta-data.
NAME = 'Keras-TextClassification'
2019-10-11 16:41:35 +08:00
DESCRIPTION = 'chinese text classification of keras'
2019-07-05 02:06:50 +08:00
URL = 'https://github.com/yongzhuo/Keras-TextClassification'
EMAIL = '1903865025@qq.com'
AUTHOR = 'yongzhuo'
LICENSE = 'MIT'
with codecs.open('README.md', 'r', 'utf8') as reader:
long_description = reader.read()
with codecs.open('requirements.txt', 'r', 'utf8') as reader:
install_requires = list(map(lambda x: x.strip(), reader.readlines()))
setup(name=NAME,
2020-12-20 00:40:30 +08:00
version='0.1.7',
2019-07-05 02:06:50 +08:00
description=DESCRIPTION,
long_description=long_description,
long_description_content_type="text/markdown",
author=AUTHOR,
author_email=EMAIL,
url=URL,
packages=find_packages(exclude=('test')),
install_requires=install_requires,
include_package_data=True,
license=LICENSE,
classifiers=['License :: OSI Approved :: MIT License',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'],)
if __name__ == "__main__":
print("setup ok!")
2019-10-11 16:41:35 +08:00
# 说明tensorflow>=1.12.0 or tensorflow-gpu>=1.12.0
# 项目工程目录这里Keras-TextClassification实际上下边还要有一层keras_textclassification也就是说keras_textclassification和setup同一层
2019-08-28 14:21:51 +08:00
# data包里必须要有__init__.py否则文件不会生成, .py文件才能copy
2019-07-05 02:06:50 +08:00
# step:
# 打开cmd
# 到达安装目录
# python setup.py build
# python setup.py install
2019-08-28 14:21:51 +08:00
# or
2019-07-05 02:06:50 +08:00
# python setup.py bdist_wheel --universal
2019-08-25 01:29:36 +08:00
# twine upload dist/*