From 1702d0f13cb7cac74ba295e12f299934aa9c292d Mon Sep 17 00:00:00 2001 From: Jakub Andrysek Date: Tue, 18 Jun 2024 10:17:19 +0200 Subject: [PATCH] chore: improve setup.py dependencies --- .idea/main-mkdoxy.iml | 2 +- .idea/misc.xml | 2 +- .idea/workspace.xml | 55 ++++++++++++++++++++++++++----------------- Makefile | 3 +++ devdeps.txt | 7 ++++++ setup.py | 31 ++++++++++++++---------- 6 files changed, 64 insertions(+), 36 deletions(-) create mode 100644 devdeps.txt diff --git a/.idea/main-mkdoxy.iml b/.idea/main-mkdoxy.iml index 5dee40d4..76f7618c 100644 --- a/.idea/main-mkdoxy.iml +++ b/.idea/main-mkdoxy.iml @@ -4,7 +4,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index a0641c7e..97b30fe4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0d3100ee..6a4636cb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,14 @@ - + + + + + + + + - { + "keyToString": { + "Python tests.pytest in /.executor": "Run", + "Python.mkdocs-serve-vPy3.11.executor": "Run", + "Python.mkdoxy-demo-vPy3.11.executor": "Debug", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "WebServerToolWindowFactoryState": "false", + "git-widget-placeholder": "main", + "last_opened_file_path": "/Users/kuba/Documents/git/kuba/mkdoxy/mkdoxy-base/mkdoxy-main", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable", + "vue.rearranger.settings.migration": "true" } -}]]> +} + - @@ -280,7 +287,8 @@ - @@ -315,6 +323,9 @@ + + + 1674630349699 diff --git a/Makefile b/Makefile index dff28a52..8a959b5e 100755 --- a/Makefile +++ b/Makefile @@ -31,3 +31,6 @@ docs-serve: docs-build: # results in site directory mkdocs build + +pre-commit: + pre-commit run --show-diff-on-failure --color=always --all-files diff --git a/devdeps.txt b/devdeps.txt new file mode 100644 index 00000000..d9883bd8 --- /dev/null +++ b/devdeps.txt @@ -0,0 +1,7 @@ +mkdocs-material~=9.5.18 +mkdocs-open-in-new-tab~=1.0.2 +pathlib~=1.0.1 +isort~=5.13.2 +pytest~=8.2.2 +pre-commit~=3.7.0 +setuptools~=70.0.0 diff --git a/setup.py b/setup.py index f1165126..da773156 100755 --- a/setup.py +++ b/setup.py @@ -11,14 +11,28 @@ def requirements(): return f.read().splitlines() +def import_requirements(): + """Imports requirements from requirements.txt file.""" + with open("requirements.txt") as f: + return f.read().splitlines() + + +def import_dev_requirements(): + """Imports requirements from devdeps.txt file.""" + with open("devdeps.txt") as f: + return f.read().splitlines() + + # https://pypi.org/project/mkdoxy/ setup( name="mkdoxy", - version="1.2.4", + version="1.2.5", description="MkDoxy → MkDocs + Doxygen = easy documentation generator with code snippets", long_description=readme(), long_description_content_type="text/markdown", - keywords="mkdoxy, python, open-source, documentation, mkdocs, doxygen, multilanguage, code-snippets, code, snippets, documentation-generator", # noqa: E501 + keywords="mkdoxy, python, open-source, documentation, mkdocs, doxygen, " + "multilanguage, code-snippets, code, snippets, documentation-generator", + # noqa: E501 url="https://github.com/JakubAndrysek/MkDoxy", author="Jakub Andrýsek", author_email="email@kubaandrysek.cz", @@ -30,23 +44,16 @@ def requirements(): "Tracker": "https://github.com/JakubAndrysek/MkDoxy/issues", "Funding": "https://github.com/sponsors/jakubandrysek", }, - install_requires=["mkdocs"], + install_requires=import_requirements(), extras_require={ - "dev": [ - "mkdocs-material~=9.5.18", - "Jinja2~=3.1.3", - "mkdocs-open-in-new-tab~=1.0.2", - "pathlib~=1.0.1", - "isort~=5.12.0", - "pytest~=6.2.5", - "pre-commit~=3.7.0", - ], + "dev": import_dev_requirements(), }, classifiers=[ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Operating System :: OS Independent", ], packages=find_packages(),