Skip to content

Commit

Permalink
Update setup.py to resolve PyPI publication failure (#177)
Browse files Browse the repository at this point in the history
* Update package name to `neon-chatbot-core` to resolve PyPI name conflict
Fix relative path refs in setup.py

* Update package name in license tests

---------

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored Nov 29, 2023
1 parent bf2508c commit b760d92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
license_tests:
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
with:
packages-exclude: '^(bs4|nvidia|bitstruct|audioread|klat-connector|chatbot-core|tqdm|dnspython).*'
packages-exclude: '^(bs4|nvidia|bitstruct|audioread|klat-connector|neon-chatbot-core|tqdm|dnspython).*'
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@

from os import path, getenv

BASE_PATH = path.abspath(path.dirname(__file__))


def get_requirements(requirements_filename: str):
requirements_file = path.join(path.abspath(path.dirname(__file__)), "requirements", requirements_filename)
requirements_file = path.join(BASE_PATH, "requirements", requirements_filename)
with open(requirements_file, 'r', encoding='utf-8') as r:
requirements = r.readlines()
requirements = [r.strip() for r in requirements if r.strip() and not r.strip().startswith("#")]
Expand All @@ -40,10 +42,10 @@ def get_requirements(requirements_filename: str):
return requirements


with open("README.md", "r") as f:
with open(path.join(BASE_PATH, "README.md"), "r") as f:
long_description = f.read()

with open("./version.py", "r", encoding="utf-8") as v:
with open(path.join(BASE_PATH, "version.py"), "r", encoding="utf-8") as v:
for line in v.readlines():
if line.startswith("__version__"):
if '"' in line:
Expand All @@ -52,7 +54,7 @@ def get_requirements(requirements_filename: str):
version = line.split("'")[1]

setuptools.setup(
name="chatbot-core",
name="neon-chatbot-core",
version=version,
author="Neongecko",
author_email="[email protected]",
Expand Down

0 comments on commit b760d92

Please sign in to comment.