@@ -23,6 +23,10 @@ Lightspeed Core Stack (LCS) is an AI powered assistant that provides answers to
2323* [ Endpoints] ( #endpoints )
2424 * [ Readiness Endpoint] ( #readiness-endpoint )
2525 * [ Liveness Endpoint] ( #liveness-endpoint )
26+ * [ Publish the service as Python package on PyPI] ( #publish-the-service-as-python-package-on-pypi )
27+ * [ Generate distribution archives to be uploaded into Python registry] ( #generate-distribution-archives-to-be-uploaded-into-python-registry )
28+ * [ Upload distribution archives into selected Python registry] ( #upload-distribution-archives-into-selected-python-registry )
29+ * [ Packages on PyPI and Test PyPI] ( #packages-on-pypi-and-test-pypi )
2630* [ Contributing] ( #contributing )
2731* [ License] ( #license )
2832* [ Additional tools] ( #additional-tools )
@@ -162,6 +166,9 @@ format Format the code into unified format
162166schema Generate OpenAPI schema file
163167requirements.txt Generate requirements.txt file containing hashes for all non-devel packages
164168shellcheck Run shellcheck
169+ verify Run all linters
170+ distribution-archives Generate distribution archives to be uploaded into Python registry
171+ upload-distribution-archives Upload distribution archives into Python registry
165172help Show this help screen
166173```
167174
@@ -230,6 +237,51 @@ The liveness endpoint performs a basic health check to verify the service is ali
230237}
231238```
232239
240+ # Publish the service as Python package on PyPI
241+
242+ To publish the service as an Python package on PyPI to be installable by anyone
243+ (including Konflux hermetic builds), perform these two steps:
244+
245+ ## Generate distribution archives to be uploaded into Python registry
246+
247+ ```
248+ make distribution-archives
249+ ```
250+
251+ Please make sure that the archive was really built to avoid publishing older one.
252+
253+ ## Upload distribution archives into selected Python registry
254+
255+ ```
256+ make upload-distribution-archives
257+ ```
258+
259+ The Python registry to where the package should be uploaded can be configured
260+ by changing ` PYTHON_REGISTRY ` . It is possible to select ` pypi ` or ` testpypi ` .
261+
262+ You might have your API token stored in file ` ~/.pypirc ` . That file should have
263+ the following form:
264+
265+ ```
266+ [testpypi]
267+ username = __token__
268+ password = pypi-{your-API-token}
269+
270+ [pypi]
271+ username = __token__
272+ password = pypi-{your-API-token}
273+ ```
274+
275+ If this configuration file does not exist, you will be prompted to specify API token from keyboard every time you try to upload the archive.
276+
277+
278+
279+ ## Packages on PyPI and Test PyPI
280+
281+ * https://pypi.org/project/lightspeed-stack/
282+ * https://test.pypi.org/project/lightspeed-stack/0.1.0/
283+
284+
233285# Contributing
234286
235287* See [ contributors] ( CONTRIBUTING.md ) guide.
0 commit comments