提交 be92338e 编写于 作者: T tangwei

fix forder format

上级 c2ebf30b
"""
setup for fleet-rec.
"""
import os
import sys
from setuptools import setup, find_packages
import tempfile
import shutil
if sys.version_info.major == 2:
requires = [
"paddlepaddle == 1.7.2",
"netron >= 5.1.1",
"yaml"
"netron >= 0.0.0",
"yaml >= 5.1.1"
]
else:
requires = [
"paddlepaddle >= 0.0.0",
"netron >= 0.0.0",
"pyyaml"
"pyyaml >= 5.1.1"
]
about = {}
......@@ -27,7 +30,26 @@ about["__url__"] = "https://github.com/seiriosPlus/FleetRec"
readme = "..."
setup(
def run_cmd(command):
assert command is not None and isinstance(command, str)
return os.popen(command).read().strip()
def build(dirname):
print(dirname)
package_dir = os.path.dirname(os.path.abspath(__file__))
run_cmd("cp -r {}/* {}".format(package_dir, dirname))
run_cmd("mv {} {}".format(os.path.join(dirname, "dataset"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "demo"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "doc"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "models"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "tools"), os.path.join(dirname, "fleetrec")))
packages = find_packages(dirname)
package_dir = {'': dirname}
setup(
name=about["__title__"],
version=about["__version__"],
description=about["__description__"],
......@@ -35,11 +57,17 @@ setup(
author=about["__author__"],
author_email=about["__author_email__"],
url=about["__url__"],
packages=find_packages(),
packages=packages,
package_dir=package_dir,
python_requires=">=2.7",
install_requires=requires,
zip_safe=False
)
)
dirname = tempfile.mkdtemp()
build(dirname)
shutil.rmtree(dirname)
print('''
\033[32m
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册