smithy-lang / smithy-python

Smithy code generators and core modules for Python (in development)
Apache License 2.0
46 stars 10 forks source link

Could not find smithy-python-codegen:jar in repo.maven.apache.org #222

Closed sabiq-khan closed 4 months ago

sabiq-khan commented 4 months ago

I wanted to try Python codegen using the quickstart-cli Weather service example. I cloned https://github.com/smithy-lang/smithy-examples.git and navigated to ~/smithy-examples/quickstart-examples/quickstart-cli.

Following documentation on Python codegen with Smithy, I made some modifications to the smithy-build.json file and ended up with this:

{
  "version": "1.0",
  "sources": ["models"],
  "maven": {
    "dependencies": [
        "software.amazon.smithy:smithy-model:[1.47.0,2.0)",
        "software.amazon.smithy:smithy-aws-traits:1.47.0",
        "software.amazon.smithy.python:smithy-python-codegen:0.1.0"
    ]
  },
  "projections": {
    "client": {
        "plugins": {
            "python-client-codegen": {
                "service": "example.weather#Weather",
                "module": "weather",
                "moduleVersion": "0.0.1"
            }
        }
    }
  }
}

I then ran smithy build, but received the following error.

Could not find artifact software.amazon.smithy.python:smithy-python-codegen:jar:0.1.0 in 1|repo.maven.apache.org (https://repo.maven.apache.org/maven2)

Visiting the URL https://repo.maven.apache.org/maven2/software/amazon/smithy/, I could not find a python directory. What happened to the python directory and the smithy-python-codegen JAR file?

JordonPhillips commented 4 months ago

You seem to have skipped a step - you need to run make install-components before smithy-build. Neither the generator itself nor the python support libraries have been published yet.