From c3dc51b8ba67725133afc5c35dc1a0993d0e62a6 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 8 Mar 2024 18:27:24 +0100 Subject: [PATCH] Fix python modules --- src/SDK/Language/Python.php | 10 ++++++++++ templates/python/package/encoders/__init__.py.twig | 1 + templates/python/package/enums/__init__.py.twig | 1 + templates/python/setup.py.twig | 5 ++--- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 templates/python/package/encoders/__init__.py.twig create mode 100644 templates/python/package/enums/__init__.py.twig diff --git a/src/SDK/Language/Python.php b/src/SDK/Language/Python.php index 891d0d67d..0af3c053c 100644 --- a/src/SDK/Language/Python.php +++ b/src/SDK/Language/Python.php @@ -185,6 +185,11 @@ public function getFiles(): array 'destination' => '{{ spec.title | caseSnake}}/encoders/value_class_encoder.py', 'template' => 'python/package/encoders/value_class_encoder.py.twig', ], + [ + 'scope' => 'default', + 'destination' => '{{ spec.title | caseSnake}}/encoders/__init__.py', + 'template' => 'python/package/encoders/__init__.py.twig', + ], [ 'scope' => 'service', 'destination' => '{{ spec.title | caseSnake}}/services/{{service.name | caseSnake}}.py', @@ -205,6 +210,11 @@ public function getFiles(): array 'destination' => '{{ spec.title | caseSnake}}/enums/{{ enum.name | caseSnake }}.py', 'template' => 'python/package/enums/enum.py.twig', ], + [ + 'scope' => 'default', + 'destination' => '{{ spec.title | caseSnake}}/enums/__init__.py', + 'template' => 'python/package/enums/__init__.py.twig', + ], ]; } diff --git a/templates/python/package/encoders/__init__.py.twig b/templates/python/package/encoders/__init__.py.twig new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/templates/python/package/encoders/__init__.py.twig @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/python/package/enums/__init__.py.twig b/templates/python/package/enums/__init__.py.twig new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/templates/python/package/enums/__init__.py.twig @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/python/setup.py.twig b/templates/python/setup.py.twig index 12eee5774..100b6c50c 100644 --- a/templates/python/setup.py.twig +++ b/templates/python/setup.py.twig @@ -19,10 +19,9 @@ setuptools.setup( maintainer_email = '{{spec.contactEmail}}', url = '{{spec.contactURL}}', download_url='https://github.com/{{sdk.gitUserName}}/{{sdk.gitRepoName}}/archive/{{sdk.version}}.tar.gz', - # keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'], install_requires=[ - 'requests', - ], + 'requests', + ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',