Skip to content

Commit 07a5920

Browse files
authored
fix slash in python aiohttp files (#16463)
1 parent 72da3b2 commit 07a5920

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

modules/openapi-generator/src/main/resources/python-aiohttp/conftest.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ def client(loop, aiohttp_client):
1111
options = {
1212
"swagger_ui": True
1313
}
14-
specification_dir = os.path.join(os.path.dirname(__file__), '..',{{#pythonSrcRoot}}
15-
"{{{.}}}",{{/pythonSrcRoot}}
14+
specification_dir = os.path.join(os.path.dirname(__file__), '..',
15+
{{#lambda.forwardslash}}
16+
{{#pythonSrcRoot}}
17+
"{{{.}}}",
18+
{{/pythonSrcRoot}}
19+
{{/lambda.forwardslash}}
1620
'{{packageName}}',
1721
'openapi')
1822
app = connexion.AioHttpApp(__name__, specification_dir=specification_dir,

modules/openapi-generator/src/main/resources/python-aiohttp/setup.mustache

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ setup(
2727
url="{{packageUrl}}",
2828
keywords=["OpenAPI", "{{appName}}"],
2929
install_requires=REQUIRES,
30-
packages=find_packages({{#pythonSrcRoot}}"{{{.}}}"{{/pythonSrcRoot}}),{{#pythonSrcRoot}}
31-
package_dir={"": "{{{.}}}"},{{/pythonSrcRoot}}
32-
package_data={'': ['{{#pythonSrcRoot}}{{{.}}}/{{/pythonSrcRoot}}openapi/openapi.yaml']},
30+
packages=find_packages({{#lambda.forwardslash}}{{#pythonSrcRoot}}"{{{.}}}"{{/pythonSrcRoot}}){{/lambda.forwardslash}},
31+
{{#lambda.forwardslash}}
32+
{{#pythonSrcRoot}}
33+
package_dir={"": "{{{.}}}"},
34+
{{/pythonSrcRoot}}
35+
{{/lambda.forwardslash}}
36+
package_data={'': ['{{#lambda.forwardslash}}{{#pythonSrcRoot}}{{{.}}}/{{/pythonSrcRoot}}{{/lambda.forwardslash}}openapi/openapi.yaml']},
3337
include_package_data=True,
3438
entry_points={
3539
'console_scripts': ['{{packageName}}={{packageName}}.__main__:main']},

modules/openapi-generator/src/main/resources/python-aiohttp/tox.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ deps=-r{toxinidir}/requirements.txt
88
{toxinidir}
99

1010
commands=
11-
{{^useNose}}pytest --cov={{{pythonSrcRoot}}}{{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}}
11+
{{^useNose}}pytest --cov={{#lambda.forwardslash}}{{{pythonSrcRoot}}}{{/lambda.forwardslash}}{{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}}

samples/server/petstore/python-aiohttp-srclayout/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
install_requires=REQUIRES,
3030
packages=find_packages("src/"),
3131
package_dir={"": "src/"},
32-
package_data={'': ['src//openapi/openapi.yaml']},
32+
package_data={'': ['src/openapi/openapi.yaml']},
3333
include_package_data=True,
3434
entry_points={
3535
'console_scripts': ['openapi_server=openapi_server.__main__:main']},

0 commit comments

Comments
 (0)