代码拉取完成,页面将自动刷新
同步操作将从 Naniko0213/luojianet_seg_fcn_series 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
'''
Function:
Setup sssegmentation
Author:
Zhenchao Jin
'''
import ssseg
from setuptools import setup, find_packages
'''readme'''
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
'''parse the package dependencies listed in a requirements file but strips specific versioning information'''
def parserequirements(fname='requirements.txt', with_version=True):
import re
import sys
from os.path import exists
require_fpath = fname
'''parse information from a line in a requirements text file'''
def parseline(line):
if line.startswith('-r '):
target = line.split(' ')[1]
for info in parserequirefile(target):
yield info
else:
info = {'line': line}
if line.startswith('-e '):
info['package'] = line.split('#egg=')[1]
elif '@git+' in line:
info['package'] = line
else:
pat = '(' + '|'.join(['>=', '==', '>']) + ')'
parts = re.split(pat, line, maxsplit=1)
parts = [p.strip() for p in parts]
info['package'] = parts[0]
if len(parts) > 1:
op, rest = parts[1:]
if ';' in rest:
version, platform_deps = map(str.strip, rest.split(';'))
info['platform_deps'] = platform_deps
else:
version = rest
info['version'] = (op, version)
yield info
'''parse require file'''
def parserequirefile(fpath):
with open(fpath, 'r') as f:
for line in f.readlines():
line = line.strip()
if line and not line.startswith('#'):
for info in parseline(line):
yield info
'''gen packages items'''
def genpackagesitems():
if exists(require_fpath):
for info in parserequirefile(require_fpath):
parts = [info['package']]
if with_version and 'version' in info:
parts.extend(info['version'])
if not sys.version.startswith('3.4'):
platform_deps = info.get('platform_deps')
if platform_deps is not None:
parts.append(';' + platform_deps)
item = ''.join(parts)
yield item
# parse and return
packages = list(genpackagesitems())
return packages
'''setup'''
setup(
name=ssseg.__title__,
version=ssseg.__version__,
description=ssseg.__description__,
long_description=long_description,
long_description_content_type='text/markdown',
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
],
author=ssseg.__author__,
url=ssseg.__url__,
author_email=ssseg.__email__,
license=ssseg.__license__,
include_package_data=True,
install_requires=parserequirements('requirements.txt'),
zip_safe=True,
packages=find_packages()
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。