From c020eaf60dfadfa0a2809713eb8f45dd3c77b446 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 20 Jun 2023 06:42:23 +0000 Subject: automatic import of python-sansio-lsp-client --- python-sansio-lsp-client.spec | 170 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 python-sansio-lsp-client.spec (limited to 'python-sansio-lsp-client.spec') diff --git a/python-sansio-lsp-client.spec b/python-sansio-lsp-client.spec new file mode 100644 index 0000000..233a288 --- /dev/null +++ b/python-sansio-lsp-client.spec @@ -0,0 +1,170 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sansio-lsp-client +Version: 0.10.0 +Release: 1 +Summary: An implementation of the client side of the LSP protocol, useful for embedding easily in your editor. +License: MIT +URL: https://github.com/PurpleMyst/sansio-lsp-client +Source0: https://mirrors.aliyun.com/pypi/web/packages/66/6f/bdc30bd28fa22d16901de2c3ad967e32a613d58bf19cba944a4ff2f09b24/sansio-lsp-client-0.10.0.tar.gz +BuildArch: noarch + +Requires: python3-dataclasses +Requires: python3-pydantic + +%description +# sansio-lsp-client + +An implementation of the client side of the LSP protocol, useful for embedding +easily in your editor. + + +## Developing + + $ git clone https://github.com/PurpleMyst/sansio-lsp-client + $ cd sansio-lsp-client + $ python3 -m venv env + $ source env/bin/activate + (env)$ pip install --upgrade pip + (env)$ pip install poetry + (env)$ poetry install + +Most tests don't work on Windows, +but GitHub Actions runs tests of all pull requests and uploads coverage files from them. +TODO: add instructions for looking at coverage files on Windows + +To run tests, first download the langservers you need. +You can mostly read `.github/workflows/test.yml`, but the Go langserver is a bit of a gotcha. +You will need to install go from https://golang.org/, +because the one from `sudo apt install golang` is too old. +Extract it inside where you cloned `sansio-lsp-client` +so that you get an executable named `sansio-lsp-client/go/bin/go`. + + $ tar xf ~/Downloads/go1.16.5.linux-amd64.tar.gz + +Once you have installed all langservers you want, you can run the tests: + + (env)$ PATH="$PATH:$(pwd)/go/bin" poetry run pytest -v + + +%package -n python3-sansio-lsp-client +Summary: An implementation of the client side of the LSP protocol, useful for embedding easily in your editor. +Provides: python-sansio-lsp-client +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sansio-lsp-client +# sansio-lsp-client + +An implementation of the client side of the LSP protocol, useful for embedding +easily in your editor. + + +## Developing + + $ git clone https://github.com/PurpleMyst/sansio-lsp-client + $ cd sansio-lsp-client + $ python3 -m venv env + $ source env/bin/activate + (env)$ pip install --upgrade pip + (env)$ pip install poetry + (env)$ poetry install + +Most tests don't work on Windows, +but GitHub Actions runs tests of all pull requests and uploads coverage files from them. +TODO: add instructions for looking at coverage files on Windows + +To run tests, first download the langservers you need. +You can mostly read `.github/workflows/test.yml`, but the Go langserver is a bit of a gotcha. +You will need to install go from https://golang.org/, +because the one from `sudo apt install golang` is too old. +Extract it inside where you cloned `sansio-lsp-client` +so that you get an executable named `sansio-lsp-client/go/bin/go`. + + $ tar xf ~/Downloads/go1.16.5.linux-amd64.tar.gz + +Once you have installed all langservers you want, you can run the tests: + + (env)$ PATH="$PATH:$(pwd)/go/bin" poetry run pytest -v + + +%package help +Summary: Development documents and examples for sansio-lsp-client +Provides: python3-sansio-lsp-client-doc +%description help +# sansio-lsp-client + +An implementation of the client side of the LSP protocol, useful for embedding +easily in your editor. + + +## Developing + + $ git clone https://github.com/PurpleMyst/sansio-lsp-client + $ cd sansio-lsp-client + $ python3 -m venv env + $ source env/bin/activate + (env)$ pip install --upgrade pip + (env)$ pip install poetry + (env)$ poetry install + +Most tests don't work on Windows, +but GitHub Actions runs tests of all pull requests and uploads coverage files from them. +TODO: add instructions for looking at coverage files on Windows + +To run tests, first download the langservers you need. +You can mostly read `.github/workflows/test.yml`, but the Go langserver is a bit of a gotcha. +You will need to install go from https://golang.org/, +because the one from `sudo apt install golang` is too old. +Extract it inside where you cloned `sansio-lsp-client` +so that you get an executable named `sansio-lsp-client/go/bin/go`. + + $ tar xf ~/Downloads/go1.16.5.linux-amd64.tar.gz + +Once you have installed all langservers you want, you can run the tests: + + (env)$ PATH="$PATH:$(pwd)/go/bin" poetry run pytest -v + + +%prep +%autosetup -n sansio-lsp-client-0.10.0 + +%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-sansio-lsp-client -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot - 0.10.0-1 +- Package Spec generated -- cgit v1.2.3