1 Star 0 Fork 0

Huoty/kodes-py

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 2.88 KB
一键复制 编辑 原始数据 按行查看 历史
Huoty 提交于 2021-03-20 15:44 +08:00 . update setup
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) Huoty - All rights reserved
# Author: Huoty <sudohuoty@gmail.com>
# CreateTime: 2016-11-04 15:07:03
from os import path
from codecs import open # To use a consistent encoding
try:
from setuptools import setup, find_packages
except ImportError:
from distutils import setup, find_packages
package_name = 'kodes'
here = path.abspath(path.dirname(__file__))
def get_version():
import ast
with open(package_name + '/__init__.py', encoding='utf-8') as f:
for line in f:
if line.strip().startswith('__version__'):
return ast.parse(line).body[0].value.s
def get_requires():
try:
with open('requirements.txt', 'r', encoding='utf-8') as f:
requires = [i for i in map(lambda x: x.strip(), f.readlines()) if i]
return requires
except IOError:
return []
def get_long_description():
try:
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
return f.read()
except IOError:
return ''
setup(
name=package_name,
version=get_version(),
description='Kodes is a utility pyton code library',
long_description=get_long_description(),
# The project's main homepage.
url='https://github.com/kuanghy/kodes-py',
# Author details
author='Huoty',
author_email='sudohuoty@gamil.com',
# Choose license
license='GPL v2',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Indicate who project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
# Pick license as wish (should match "license" above)
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
# Specify the Python versions support here. In particular, ensure
# that project indicate whether project support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
# What does project relate to
keywords='utilities',
# Can just specify the packages manually here if project is
# simple. Or can use find_packages().
packages=find_packages(exclude=['docs', 'tests']),
# List run-time dependencies here. requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=get_requires(),
# List additional groups of dependencies here (e.g. development
# dependencies). Can install these using the following syntax,
# for example:
# $ pip install -e .[dev,test]
extras_require={
'dev': ['check-manifest'],
'test': ['pytest', 'coverage'],
},
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/konghy/kodes-py.git
git@gitee.com:konghy/kodes-py.git
konghy
kodes-py
kodes-py
master

搜索帮助