diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-15 05:05:39 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-15 05:05:39 +0000 |
commit | bc3ff4300ba839686d2f0cd8d35394e6a552174e (patch) | |
tree | d2a48e8d26fc48425dc6850531e715cf3059731d /python-wlc.spec | |
parent | a4bc8ffedc432a8589f3117144d8836ab93c7a98 (diff) |
automatic import of python-wlc
Diffstat (limited to 'python-wlc.spec')
-rw-r--r-- | python-wlc.spec | 367 |
1 files changed, 367 insertions, 0 deletions
diff --git a/python-wlc.spec b/python-wlc.spec new file mode 100644 index 0000000..ab53e9b --- /dev/null +++ b/python-wlc.spec @@ -0,0 +1,367 @@ +%global _empty_manifest_terminate_build 0 +Name: python-wlc +Version: 1.13 +Release: 1 +Summary: A command-line utility for Weblate, translation tool with tight version control integration +License: GPL-3.0-or-later +URL: https://weblate.org/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a0/2d/630d038208c35ba3b4f67cc108d5b4e83ecfedabeea21921a2ff2e5cd310/wlc-1.13.tar.gz +BuildArch: noarch + +Requires: python3-argcomplete +Requires: python3-dateutil +Requires: python3-pyxdg +Requires: python3-requests + +%description +<a href="https://weblate.org/"><img alt="Weblate" src="https://s.weblate.org/cdn/Logo-Darktext-borders.png" height="80px" /></a> + +**Weblate is a copylefted libre software web-based continuous localization system, +used by over 2500 libre projects and companies in more than 165 countries.** + +# wlc + +wlc is a [Weblate](https://weblate.org/) command-line client using [Weblate's REST API](https://docs.weblate.org/en/latest/api.html). + +[](https://weblate.org/) +[](https://hosted.weblate.org/engage/weblate/?utm_source=widget) +[](https://bestpractices.coreinfrastructure.org/projects/552) +[](https://pypi.org/project/wlc/) +[](https://docs.weblate.org/en/latest/wlc.html) + +## PIP Installation + +Install using pip: + +```console +pip3 install wlc +``` + +Sources are available at <https://github.com/WeblateOrg/wlc>. + +## Usage + +Please see [Weblate documentation](https://docs.weblate.org/en/latest/wlc.html) for more complete documentation. + +Command-line usage: + +```console +wlc list-projects +wlc list-components +wlc list-translations +wlc list-languages +wlc show +wlc ls +wlc commit +wlc push +wlc pull +wlc repo +wlc stats +wlc lock +wlc unlock +wlc lock-status +wlc download +wlc upload +``` + +Configuration is stored in `~/.config/weblate`. The key/values (`retries`, +`timeout`, `method_whitelist`, `backoff_factor`, `status_forcelist`) are closely +coupled with the [urllib3 parameters](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html) and allows the user to configure request +parameters. + +```ini +[weblate] +url = https://hosted.weblate.org/api/ +retries = 3 +method_whitelist = PUT,POST,GET +backoff_factor = 0.2 +status_forcelist = 429,500,502,503,504 +timeout = 30 + +[keys] +https://hosted.weblate.org/api/ = APIKEY +``` + +## Docker image + +The image is published on [Docker Hub](https://hub.docker.com/r/weblate/wlc). + +Building locally: + +```console +docker build -t weblate/wlc . +``` + +Detailed documentation is available in [Weblate documentation](https://docs.weblate.org/en/latest/wlc.html#docker-wlc). + +## Docker hub tags + +You can use following tags on Docker hub: + +| Tag name | Description | Use case | +| -------- | --------------------------------------------------------------------------------- | ----------------------------------------------- | +| `latest` | wlc stable release, matches latest tagged release | Rolling updates in a production environment | +| `edge` | wlc development | Staging environment | +| version | wlc stable release, see [weblate/wlc](https://hub.docker.com/r/weblate/wlc/tags/) | Well defined deploy in a production environment | + +Every image is tested by our CI before it gets published, so even the `bleeding` version should be quite safe to use. + +## Contributing + +Contributions are welcome! See [documentation](https://docs.weblate.org/en/latest/contributing/modules.html) for more information. + + + + +%package -n python3-wlc +Summary: A command-line utility for Weblate, translation tool with tight version control integration +Provides: python-wlc +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-wlc +<a href="https://weblate.org/"><img alt="Weblate" src="https://s.weblate.org/cdn/Logo-Darktext-borders.png" height="80px" /></a> + +**Weblate is a copylefted libre software web-based continuous localization system, +used by over 2500 libre projects and companies in more than 165 countries.** + +# wlc + +wlc is a [Weblate](https://weblate.org/) command-line client using [Weblate's REST API](https://docs.weblate.org/en/latest/api.html). + +[](https://weblate.org/) +[](https://hosted.weblate.org/engage/weblate/?utm_source=widget) +[](https://bestpractices.coreinfrastructure.org/projects/552) +[](https://pypi.org/project/wlc/) +[](https://docs.weblate.org/en/latest/wlc.html) + +## PIP Installation + +Install using pip: + +```console +pip3 install wlc +``` + +Sources are available at <https://github.com/WeblateOrg/wlc>. + +## Usage + +Please see [Weblate documentation](https://docs.weblate.org/en/latest/wlc.html) for more complete documentation. + +Command-line usage: + +```console +wlc list-projects +wlc list-components +wlc list-translations +wlc list-languages +wlc show +wlc ls +wlc commit +wlc push +wlc pull +wlc repo +wlc stats +wlc lock +wlc unlock +wlc lock-status +wlc download +wlc upload +``` + +Configuration is stored in `~/.config/weblate`. The key/values (`retries`, +`timeout`, `method_whitelist`, `backoff_factor`, `status_forcelist`) are closely +coupled with the [urllib3 parameters](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html) and allows the user to configure request +parameters. + +```ini +[weblate] +url = https://hosted.weblate.org/api/ +retries = 3 +method_whitelist = PUT,POST,GET +backoff_factor = 0.2 +status_forcelist = 429,500,502,503,504 +timeout = 30 + +[keys] +https://hosted.weblate.org/api/ = APIKEY +``` + +## Docker image + +The image is published on [Docker Hub](https://hub.docker.com/r/weblate/wlc). + +Building locally: + +```console +docker build -t weblate/wlc . +``` + +Detailed documentation is available in [Weblate documentation](https://docs.weblate.org/en/latest/wlc.html#docker-wlc). + +## Docker hub tags + +You can use following tags on Docker hub: + +| Tag name | Description | Use case | +| -------- | --------------------------------------------------------------------------------- | ----------------------------------------------- | +| `latest` | wlc stable release, matches latest tagged release | Rolling updates in a production environment | +| `edge` | wlc development | Staging environment | +| version | wlc stable release, see [weblate/wlc](https://hub.docker.com/r/weblate/wlc/tags/) | Well defined deploy in a production environment | + +Every image is tested by our CI before it gets published, so even the `bleeding` version should be quite safe to use. + +## Contributing + +Contributions are welcome! See [documentation](https://docs.weblate.org/en/latest/contributing/modules.html) for more information. + + + + +%package help +Summary: Development documents and examples for wlc +Provides: python3-wlc-doc +%description help +<a href="https://weblate.org/"><img alt="Weblate" src="https://s.weblate.org/cdn/Logo-Darktext-borders.png" height="80px" /></a> + +**Weblate is a copylefted libre software web-based continuous localization system, +used by over 2500 libre projects and companies in more than 165 countries.** + +# wlc + +wlc is a [Weblate](https://weblate.org/) command-line client using [Weblate's REST API](https://docs.weblate.org/en/latest/api.html). + +[](https://weblate.org/) +[](https://hosted.weblate.org/engage/weblate/?utm_source=widget) +[](https://bestpractices.coreinfrastructure.org/projects/552) +[](https://pypi.org/project/wlc/) +[](https://docs.weblate.org/en/latest/wlc.html) + +## PIP Installation + +Install using pip: + +```console +pip3 install wlc +``` + +Sources are available at <https://github.com/WeblateOrg/wlc>. + +## Usage + +Please see [Weblate documentation](https://docs.weblate.org/en/latest/wlc.html) for more complete documentation. + +Command-line usage: + +```console +wlc list-projects +wlc list-components +wlc list-translations +wlc list-languages +wlc show +wlc ls +wlc commit +wlc push +wlc pull +wlc repo +wlc stats +wlc lock +wlc unlock +wlc lock-status +wlc download +wlc upload +``` + +Configuration is stored in `~/.config/weblate`. The key/values (`retries`, +`timeout`, `method_whitelist`, `backoff_factor`, `status_forcelist`) are closely +coupled with the [urllib3 parameters](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html) and allows the user to configure request +parameters. + +```ini +[weblate] +url = https://hosted.weblate.org/api/ +retries = 3 +method_whitelist = PUT,POST,GET +backoff_factor = 0.2 +status_forcelist = 429,500,502,503,504 +timeout = 30 + +[keys] +https://hosted.weblate.org/api/ = APIKEY +``` + +## Docker image + +The image is published on [Docker Hub](https://hub.docker.com/r/weblate/wlc). + +Building locally: + +```console +docker build -t weblate/wlc . +``` + +Detailed documentation is available in [Weblate documentation](https://docs.weblate.org/en/latest/wlc.html#docker-wlc). + +## Docker hub tags + +You can use following tags on Docker hub: + +| Tag name | Description | Use case | +| -------- | --------------------------------------------------------------------------------- | ----------------------------------------------- | +| `latest` | wlc stable release, matches latest tagged release | Rolling updates in a production environment | +| `edge` | wlc development | Staging environment | +| version | wlc stable release, see [weblate/wlc](https://hub.docker.com/r/weblate/wlc/tags/) | Well defined deploy in a production environment | + +Every image is tested by our CI before it gets published, so even the `bleeding` version should be quite safe to use. + +## Contributing + +Contributions are welcome! See [documentation](https://docs.weblate.org/en/latest/contributing/modules.html) for more information. + + + + +%prep +%autosetup -n wlc-1.13 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-wlc -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 1.13-1 +- Package Spec generated |