2022-03-30 04:42:47 -04:00
|
|
|
{{if eq .PackageDescriptor.Package.Type "pypi"}}
|
2022-06-27 16:58:46 -04:00
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
|
2022-03-30 04:42:47 -04:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
2022-06-27 16:58:46 -04:00
|
|
|
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pypi.install"}}</label>
|
2023-04-08 14:57:00 -04:00
|
|
|
<div class="markup"><pre class="code-block"><code>pip install --index-url <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple/"></gitea-origin-url> {{.PackageDescriptor.Package.Name}}</code></pre></div>
|
2022-03-30 04:42:47 -04:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-07-07 04:47:26 -04:00
|
|
|
<label>{{.locale.Tr "packages.registry.documentation" "PyPI" "https://docs.gitea.io/en-us/usage/packages/pypi/" | Safe}}</label>
|
2022-03-30 04:42:47 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}}
|
2022-06-27 16:58:46 -04:00
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
|
2022-03-30 04:42:47 -04:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<p>{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}</p>
|
|
|
|
{{if .PackageDescriptor.Metadata.LongDescription}}
|
2023-02-24 01:36:07 -05:00
|
|
|
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}}
|
2022-03-30 04:42:47 -04:00
|
|
|
{{else if .PackageDescriptor.Metadata.Description}}
|
2023-02-24 01:36:07 -05:00
|
|
|
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Description}}
|
2022-03-30 04:42:47 -04:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .PackageDescriptor.Metadata.RequiresPython}}
|
2022-06-27 16:58:46 -04:00
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.requirements"}}</h4>
|
2022-03-30 04:42:47 -04:00
|
|
|
<div class="ui attached segment">
|
2022-06-27 16:58:46 -04:00
|
|
|
{{.locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
|
2022-03-30 04:42:47 -04:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|