-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
exclude = | ||
.git | ||
.github | ||
dist | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
|
@@ -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}, | ||
) |