pyecharts/setup.py
LeoSun 64ba867342
🚀 Prepare for version 2.0.9【Last support version for Echarts 5.x】 (#2420)
* add support with google map(GMap)

* add support with leaflet map(LMap);

* fix blank

* add api in class Base for echarts stats extension

* support multiple calendar (#2414)

* support multiple calendar

* Fix PrettyTable class not expose parameters (#2416)

* Fix/grid and table (#2419)

fix grid chart_id not working and format table.py

* update version to 2.0.9

* fix: issue#2421 (#2422)

fix: issue#2421

* Fix grid index (#2426)

fix some bugs in Grid component

* 更新 MarkPointOpts、MarkPointItemOpts 以及 LabelOpts (#2427)

* update README.md

* [hotfix]fix page missing css_libs

* fix workflows

* fix workflows

* update engine.py

* FIX enable changing locale (#2442)

* FIX enable changing locale

* FIX add locale two more templates

* FIX add tests and defaultLocale

* FIX add tests and defaultLocale

* FIX add locale render in HTML test

---------

Co-authored-by: Feiko Ritsema <fritsema@netflix.com>

* update line.py and update workflows

* update python-app.yml

---------

Co-authored-by: sunhailin <sunhailin@jtexpress.com>
Co-authored-by: jiangyang <jiangyangcreate@gmail.com>
Co-authored-by: GokoRuri <1249736473@qq.com>
Co-authored-by: Feiko <feiko.ritsema@hotmail.com>
Co-authored-by: Feiko Ritsema <fritsema@netflix.com>
2025-10-10 15:24:18 +08:00

106 lines
3.1 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", "simplejson"]
__extra_requires__ = {
"selenium": ["snapshot-selenium"],
"phantomjs": ["snapshot-phantomjs"],
"pyppeteer": ["snapshot-pyppeteer"],
"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 sdist 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 :: 5 - Production/Stable",
"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",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries",
],
cmdclass={"upload": UploadCommand},
extras_require=__extra_requires__,
)