diff --git a/for_runners_project/__main__.py b/for_runners_project/__main__.py index e43dadf..09a1bc8 100644 --- a/for_runners_project/__main__.py +++ b/for_runners_project/__main__.py @@ -2,28 +2,16 @@ Allow for_runners to be executable through `python -m for_runners`. """ -from pathlib import Path -from manage_django_project.config import ManageConfig from manage_django_project.manage import execute_django_from_command_line -import for_runners -import for_runners_project - def main(): """ entrypoint installed via pyproject.toml and [project.scripts] section. Must be set in ./manage.py and PROJECT_SHELL_SCRIPT """ - execute_django_from_command_line( - config=ManageConfig( - module=for_runners_project, - project_root_path=Path(for_runners.__file__).parent.parent, - local_settings='for_runners_project.settings.local', - test_settings='for_runners_project.settings.tests', - ) - ) + execute_django_from_command_line() if __name__ == '__main__': diff --git a/pyproject.toml b/pyproject.toml index 5abe3f3..f3baa35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ ] [project.optional-dependencies] dev = [ - "manage_django_project>=0.1.0", # https://github.com/jedie/manage_django_project + "manage_django_project>=0.3.0rc0", # https://github.com/jedie/manage_django_project "tblib", # https://github.com/ionelmc/python-tblib "pip-tools", # https://github.com/jazzband/pip-tools/ "tox", # https://github.com/tox-dev/tox @@ -82,6 +82,16 @@ Source = "https://github.com/jedie/django-for-runners" [project.scripts] for_runners_project = "for_runners_project.__main__:main" +[manage_django_project] +module_name="for_runners_project" + +# Django settings used for all commands except test/coverage/tox: +local_settings='for_runners_project.settings.local' + +# Django settings used for test/coverage/tox commands: +test_settings='for_runners_project.settings.tests' + + [build-system] requires = ["setuptools>=61.0", "setuptools_scm>=7.1"] build-backend = "setuptools.build_meta" diff --git a/requirements.dev.txt b/requirements.dev.txt index c9324e7..c79c393 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -726,9 +726,9 @@ lxml==4.9.2 \ --hash=sha256:f1496ea22ca2c830cbcbd473de8f114a320da308438ae65abad6bab7867fe38f \ --hash=sha256:f49e52d174375a7def9915c9f06ec4e569d235ad428f70751765f48d5926678c # via django-for-runners (pyproject.toml) -manage-django-project==0.2.2 \ - --hash=sha256:262672cf1ef86cd0ae5ffe18e80de47d5f8b2fedb65c26c0d2377f6fab64a83b \ - --hash=sha256:f39d575c36ebb2af366cf62818454eab33328c3a1809590b4389ef31b865c21d +manage-django-project==0.3.0rc0 \ + --hash=sha256:0ce7254e2d45ae99f0054acc0d32e513aebd31af0babaeec31371ec509b129f4 \ + --hash=sha256:f45c7d001f839bc5c54ae3c2681229b4fbb17118b1acdf1da0d97da448dab975 # via django-for-runners (pyproject.toml) manageprojects==0.9.9 \ --hash=sha256:41a26119df5d03f57c83f04b30e8f6908025e6e59a7e79b2777393fa33f44481 \