mirror of
https://github.com/pyecharts/pyecharts.git
synced 2025-12-08 20:59:23 +00:00
* Format: code * Remove: #coding=utf-8 * Add: 新增示例以及数据 json 文件 * Update: 移除 List 使用 Sequence 代替,移除 instance 判断 * Update: 修复 Geo Lines 线条丢失的问题 * Remove: 移除 Mark* data 类型判断 * Update: js_functions/bmap_js_funtions 分开处理 * Update: 解决 Grid 图 title 不为 List 的问题 * Update: self.color 对外暴露 * Test: 完善测试 * Update: 更新测试和示例 * Fix: test * Fix: 修复 Grid 不能正常渲染主题以及标题的问题 * Add: Bar 图新增 gap 参数 * Add: example * Update: 百度地图 ak 保存至环境变量中
98 lines
2.6 KiB
Python
98 lines
2.6 KiB
Python
import os
|
|
import sys
|
|
from shutil import rmtree
|
|
|
|
from setuptools import Command, find_packages, setup
|
|
|
|
# RELEASE STEPS
|
|
# $ python setup.py upload
|
|
|
|
|
|
__title__ = "pyecharts"
|
|
__description__ = "Python options, make charting easier"
|
|
__url__ = "https://github.com/pyecharts/pyecharts"
|
|
__author_email__ = "chenjiandongx@qq.com"
|
|
__license__ = "MIT"
|
|
|
|
__requires__ = ["jinja2", "prettytable"]
|
|
__extra_requires__ = {
|
|
"selenium": ["snapshot-selenium"],
|
|
"phantomjs": ["snapshot-phantomjs"],
|
|
"images": ["PIL"],
|
|
}
|
|
|
|
__keywords__ = ["Echarts", "charts", "plotting-tool"]
|
|
# Load the package's _version.py module as a dictionary.
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
about = {}
|
|
with open(os.path.join(here, __title__, "_version.py")) as f:
|
|
exec(f.read(), about)
|
|
|
|
|
|
__version__ = about["__version__"]
|
|
|
|
|
|
class UploadCommand(Command):
|
|
description = "Build and publish the package."
|
|
user_options = []
|
|
|
|
@staticmethod
|
|
def status(s):
|
|
print("✨✨ {0}".format(s))
|
|
|
|
def initialize_options(self):
|
|
pass
|
|
|
|
def finalize_options(self):
|
|
pass
|
|
|
|
def run(self):
|
|
try:
|
|
self.status("Removing previous builds…")
|
|
rmtree(os.path.join(here, "dist"))
|
|
rmtree(os.path.join(here, "build"))
|
|
rmtree(os.path.join(here, "{0}.egg-info".format(__title__)))
|
|
except OSError:
|
|
pass
|
|
|
|
self.status("Building Source and Wheel distribution…")
|
|
os.system("{0} setup.py bdist_wheel".format(sys.executable))
|
|
|
|
self.status("Uploading the package to PyPI via Twine…")
|
|
os.system("twine upload dist/*")
|
|
|
|
self.status("Pushing git tags…")
|
|
os.system('git tag -a v{0} -m "release version v{0}"'.format(__version__))
|
|
os.system("git push origin v{0}".format(__version__))
|
|
|
|
sys.exit()
|
|
|
|
|
|
setup(
|
|
name=__title__,
|
|
version=__version__,
|
|
description=__description__,
|
|
url=__url__,
|
|
author=about["__author__"],
|
|
author_email=__author_email__,
|
|
license=__license__,
|
|
packages=find_packages(exclude=("test",)),
|
|
keywords=__keywords__,
|
|
install_requires=__requires__,
|
|
zip_safe=False,
|
|
include_package_data=True,
|
|
classifiers=[
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: Console",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3.6",
|
|
"Programming Language :: Python :: 3.7",
|
|
"Topic :: Software Development :: Libraries",
|
|
],
|
|
cmdclass={"upload": UploadCommand},
|
|
extras_require=__extra_requires__,
|
|
)
|