diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2024-10-25 18:24:13 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2024-10-25 18:24:13 +0200 |
| commit | 2a390e99e03fe538169aa6d7c23669eaa5ece467 (patch) | |
| tree | 211a184bfc362fbc3f7186789eb65391b7f1fb87 | |
| parent | 70b7b2d950b62939034eaa34c605beb8159edd51 (diff) | |
Added the requirements on the static files
| -rw-r--r-- | pyproject.toml | 19 | ||||
| -rw-r--r-- | src/match_up/__init__.py (renamed from src/match_up/app.py) | 7 | ||||
| -rw-r--r-- | src/match_up/controller.py | 4 |
3 files changed, 24 insertions, 6 deletions
diff --git a/pyproject.toml b/pyproject.toml index cae5554..9ef21d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,10 @@ +[build-system] +requires = ["setuptools>=64", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + [project] name = "match_up" -version = "0.1" +dynamic = ["version"] authors = [ { name="Karan Jayachandra", email="mail@karanjayachandra.com" }, ] @@ -15,4 +19,15 @@ classifiers = [ [project.urls] Homepage = "https://gitlab.com/KaranJayachandra/match_up" -Issues = "https://gitlab.com/KaranJayachandra/match_up/-/issues"
\ No newline at end of file +Issues = "https://gitlab.com/KaranJayachandra/match_up/-/issues" + + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +"*" = ["*.txt"] +mypkg1 = ["data1.rst"] + +[project.scripts] +match_up = "match_up:main"
\ No newline at end of file diff --git a/src/match_up/app.py b/src/match_up/__init__.py index cb790f3..badf3f0 100644 --- a/src/match_up/app.py +++ b/src/match_up/__init__.py @@ -1,6 +1,6 @@ from dotenv import load_dotenv -from controller import RoundGenerator -from model import CourtList, PlayerList +from match_up.controller import RoundGenerator +from match_up.model import CourtList, PlayerList from jinja2 import FileSystemLoader, Environment from flask import Flask, render_template, request @@ -88,3 +88,6 @@ def toggle_court(court_number): @app.route("/courts", methods=["GET"]) def get_list_of_courts(): return render_template("courts.j2", courts=rg.courts.get_courts()) + +def main(): + app.run() diff --git a/src/match_up/controller.py b/src/match_up/controller.py index e6dc827..2f8bfaf 100644 --- a/src/match_up/controller.py +++ b/src/match_up/controller.py @@ -1,8 +1,8 @@ from typing import Tuple from operator import attrgetter from dataclasses import dataclass -from utilities import sample_list, Timer -from model import Team, Game, PlayerList, CourtList, MAX_LEVEL, PLAYER_PER_COURT +from match_up.utilities import sample_list, Timer +from match_up.model import Team, Game, PlayerList, CourtList, MAX_LEVEL, PLAYER_PER_COURT def _create_placeholders(courts: dict, name: str) -> list[Game]: |
