Skip to content

Unexpected package name by using package-name property #721

@tibortakacs

Description

@tibortakacs

Input YAML settings:

python: true
use: "@autorest/python@5.1.0-preview.4"
init: false
override-client-name: public_api_client
input-file: publicapi_oas.json
azure-arm: false
add-credentials: true
credential-scopes: https://ostechnology.onmicrosoft.com/azsphereapi/user_impersonation
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
namespace: azure.sphere.publicapi
package-name: azure-sphere-publicapi
clear-output-folder: true
basic-setup-py: true
output-folder: azure-sphere-publicapi

AutoRest script: autorest --publicapi --init --package-version=0.7

Output setup.py file:

# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# coding: utf-8

from setuptools import setup, find_packages

NAME = "publicapiclient"
VERSION = "0.7"

# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"]

setup(
    name=NAME,
    version=VERSION,
    description="PublicApiClient",
    author_email="",
    url="",
    keywords=["Swagger", "PublicApiClient"],
    install_requires=REQUIRES,
    packages=find_packages(),
    include_package_data=True,
    long_description="""\
    PublicApiClient.
    """
)

Expected name:
NAME = "azure-sphere-publicapi"

Received name:
NAME = "publicapiclient"

Additional information:

Metadata

Metadata

Assignees

Labels

bugThis issue requires a change to an existing behavior in the product in order to be resolved.p0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions