Skip to content

Commit

Permalink
chore: set UploadCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed Nov 14, 2024
1 parent 04a9515 commit 9686c91
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 4 deletions.
6 changes: 6 additions & 0 deletions bindings/streamlit-gpt-vis/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
exclude =
.git
.github
dist
docs
51 changes: 47 additions & 4 deletions bindings/streamlit-gpt-vis/setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,54 @@
from pathlib import Path

from shutil import rmtree
import os
import sys
import setuptools

# Load the package's _version.py module as a dictionary.
here = os.path.abspath(os.path.dirname(__file__))

__title__ = "streamlit-gpt-vis"
__version__ = "0.0.1"

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()

class UploadCommand(setuptools.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 sdist".format(sys.executable))

self.status("Uploading the package to PyPI via Twine…")
os.system("python -m twine upload dist/*")

sys.exit()

setuptools.setup(
name="streamlit-gpt-vis",
version="0.0.1",
author="lvisei",
name=__title__,
version=__version__,
author="@lvisei",
author_email="[email protected]",
description="Components for GPTs, generative AI, and LLM projects. Not only UI Components.",
long_description=long_description,
Expand All @@ -24,5 +64,8 @@
# If your component has other Python dependencies, list
# them here.
"streamlit >= 0.63",
]
],
__keywords__ = ["AntV", "GPTs", "Vis",
"visualization", "map", "geospatial", "plot", "Graph", "LLM"],
cmdclass={"upload": UploadCommand},
)

0 comments on commit 9686c91

Please sign in to comment.