Implement setup.py
Update entrypoints
This commit is contained in:
parent
8ccdde5cb1
commit
b8d712e19d
3 changed files with 31 additions and 8 deletions
|
@ -2,8 +2,7 @@ FROM python:3.12-bookworm
|
|||
|
||||
EXPOSE 8080
|
||||
|
||||
COPY site_mcknight_tech /site
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip install -r /tmp/requirements.txt
|
||||
COPY . /site
|
||||
RUN pip install /site
|
||||
|
||||
ENTRYPOINT [ "python3", "/site/__main__.py" ]
|
||||
ENTRYPOINT [ "launch-site" ]
|
||||
|
|
27
setup.py
Normal file
27
setup.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright (C) 2025 Daniel McKnight - All Rights Reserved
|
||||
from os.path import join, dirname
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
def get_requirements(requirements_filename: str):
|
||||
requirements_file = join(dirname(__file__), 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("#")]
|
||||
return requirements
|
||||
|
||||
setup(
|
||||
name="site-mcknight-tech",
|
||||
author="Daniel McKnight",
|
||||
author_email="daniel@mcknight.tech",
|
||||
description="McKnight Tech Website",
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
package_data={"site_mcknight_tech": ["page_content/*"]},
|
||||
install_requires=get_requirements("requirements.txt"),
|
||||
entry_points={
|
||||
"console_scripts": ['launch-site=site_mcknight_tech.__main__:main']
|
||||
}
|
||||
)
|
|
@ -44,7 +44,4 @@ def render_header() -> ui.tab_panels:
|
|||
def main():
|
||||
header = render_header()
|
||||
header.set_value(list(_tab_to_content.keys())[0])
|
||||
ui.run(dark=None)
|
||||
|
||||
|
||||
main()
|
||||
ui.run(dark=None, reload=False)
|
||||
|
|
Loading…
Reference in a new issue