@@ -76,7 +76,7 @@ asyncapi_python_service(
7676)
7777```
7878
79- This will be generating python module named ` asyncapi_app ` on ` codegen-export ` and ` export ` goals.
79+ This will be generating python module named ` asyncapi_app ` on ` codegen-export ` , and ` export ` goals.
8080This target can later be used as a dependency of ` python_sources ` .
8181
8282``` python
@@ -100,51 +100,16 @@ Note that this plugin does not do dependency injection, so asyncapi-python must
100100asyncapi-python[amqp]
101101```
102102
103- ### Deploying this plugin into pants monorepo
104-
105- In order to deploy this plugin into your pants monorepo, create the following structure inside your plugins folder:
106-
107- ``` bash
108- pants-plugins/
109- └── asyncapi_python_plugin
110- ├── BUILD
111- ├── __init__.py
112- ├── register.py
113- └── requirements.txt
114- ```
115-
116- ` requirements.txt ` must contain:
117-
118- ``` text
119- asyncapi-python
120- ```
121-
122- ` register.py ` should have:
123-
124- ``` python
125- from asyncapi_python_pants.register import *
126- ```
127-
128- ` BUILD ` must include:
129-
130- ``` python
131- python_sources(
132- dependencies = [" :reqs" ],
133- )
134-
135- python_requirements(
136- name = " reqs" ,
137- )
138- ```
139-
140- ` __init__.py ` can be empty, but it has to exist.
141-
142- Finally, add ` pants-plugins ` to your ` PYTHONPATH ` , and add the created folder as a backend package:
103+ ### Deploying this plugin into your pants monorepo
143104
144105``` toml
145106# pants.toml
107+ plugins = [
108+ " asyncapi_python[codegen]==0.2.5" , # Plugin version MUST match the version of your python clients
109+ ...
110+ ]
146111backend_packages = [
147- " asyncapi_python_plugin " ,
112+ " asyncapi_python_pants " ,
148113 ...
149114]
150115pythonpath = [" %(buildroot)s/pants-plugins" ]
0 commit comments