Compare commits

...

10 Commits

Author SHA256 Message Date
Andreas Schneider
ae969a6859 Accepting request 1184268 from home:gladiac
- Update to version 1.1.369
  https://github.com/microsoft/pyright/releases/tag/1.1.369

OBS-URL: https://build.opensuse.org/request/show/1184268
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=12
2024-07-01 12:02:51 +00:00
Andreas Schneider
da2c51bc98 Update to version 1.1.369
OBS-URL: https://build.opensuse.org/package/show/home:gladiac/nodejs-pyright?expand=0&rev=13
2024-07-01 08:40:13 +00:00
Andreas Schneider
e0fe03019b Accepting request 1184225 from home:gladiac
- Add support to build for Fedora

OBS-URL: https://build.opensuse.org/request/show/1184225
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=11
2024-07-01 08:25:43 +00:00
h
a890f4b400 - Update to version 1.1.349
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=10
2024-01-29 08:21:29 +00:00
h
43bedb70ba - Update to version 1.1.348
* https://github.com/microsoft/pyright/releases/tag/1.1.343
 - Do not delete *.node files

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=9
2024-01-22 00:09:06 +00:00
Andreas Schneider
62ee18941f Accepting request 1135719 from home:Outbound3031:branches:devel:languages:nodejs
- Update to version 1.1.343
  * https://github.com/microsoft/pyright/releases/tag/1.1.343

OBS-URL: https://build.opensuse.org/request/show/1135719
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=8
2024-01-04 11:40:15 +00:00
Andreas Schneider
717a6d572d Accepting request 1125253 from home:Outbound3031:branches:devel:languages:nodejs
- Update to version 1.1.335
  * https://github.com/microsoft/pyright/releases/tag/1.1.335

OBS-URL: https://build.opensuse.org/request/show/1125253
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=7
2023-11-12 17:36:47 +00:00
Andreas Schneider
c3a5b0a563 Accepting request 1124242 from home:Outbound3031:branches:devel:languages:nodejs
- Added python311 as a dependency. 

- Update to version 1.1.334
  * https://github.com/microsoft/pyright/releases/tag/1.1.334

OBS-URL: https://build.opensuse.org/request/show/1124242
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=6
2023-11-10 08:13:45 +00:00
Andreas Schneider
2596dd9cf3 - Update to version 1.1.317
* https://github.com/microsoft/pyright/releases/tag/1.1.317

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=5
2023-07-14 09:40:30 +00:00
Andreas Schneider
d21f585f7a Update to version 1.1.244
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-pyright?expand=0&rev=4
2022-05-05 06:13:10 +00:00
7 changed files with 134 additions and 39 deletions

View File

@@ -1,3 +1,61 @@
-------------------------------------------------------------------
Mon Jul 1 08:38:43 UTC 2024 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 1.1.369
https://github.com/microsoft/pyright/releases/tag/1.1.369
-------------------------------------------------------------------
Mon Jul 1 07:37:01 UTC 2024 - Andreas Schneider <asn@cryptomilk.org>
- Add support to build for Fedora
-------------------------------------------------------------------
Mon Jan 29 08:18:40 UTC 2024 - Mazin Alhaddad <mazin@getstate.dev>
- Update to version 1.1.349
-------------------------------------------------------------------
Sun Jan 21 23:36:42 UTC 2024 - h <mazin@getstate.dev>
- Update to version 1.1.348
* https://github.com/microsoft/pyright/releases/tag/1.1.343
- Do not delete *.node files
-------------------------------------------------------------------
Sat Dec 30 00:34:12 UTC 2023 - h <mazin@getstate.dev>
- Update to version 1.1.343
* https://github.com/microsoft/pyright/releases/tag/1.1.343
-------------------------------------------------------------------
Sun Nov 12 16:01:31 UTC 2023 - h <mazinalhaddad05@gmail.com>
- Update to version 1.1.335
* https://github.com/microsoft/pyright/releases/tag/1.1.335
-------------------------------------------------------------------
Sun Nov 5 17:48:25 UTC 2023 - h <mazinalhaddad05@gmail.com>
- Added python311 as a dependency.
-------------------------------------------------------------------
Sun Nov 5 16:54:27 UTC 2023 - h <mazinalhaddad05@gmail.com>
- Update to version 1.1.334
* https://github.com/microsoft/pyright/releases/tag/1.1.334
-------------------------------------------------------------------
Fri Jul 14 09:39:44 UTC 2023 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 1.1.317
* https://github.com/microsoft/pyright/releases/tag/1.1.317
-------------------------------------------------------------------
Thu May 5 06:12:09 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 1.1.244
* https://github.com/microsoft/pyright/releases/tag/1.1.244
-------------------------------------------------------------------
Tue Jul 20 06:31:37 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>

View File

@@ -15,21 +15,31 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkg_name pyright
Name: nodejs-pyright
Version: 1.1.157
Version: 1.1.369
Release: 0
Summary: Type checker and LSP for the Python language
License: MIT
Url: https://github.com/microsoft/pyright
Source0: %{url}/archive/%{version}/%{pkg_name}-%{version}.tar.gz
# Create with `bash prepare_vendor.sh`
Source1: vendor.tar.xz
Source1: %{pkg_name}-%{version}-vendor.tar.zst
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: npm >= 14
BuildRequires: npm >= 16
BuildRequires: nodejs-packaging
BuildRequires: nodejs-devel
BuildRequires: rsync
BuildRequires: zstd
%if 0%{?suse_version}
BuildRequires: python311
BuildRequires: python311-setuptools
%else
BuildRequires: python3-setuptools
%endif
BuildArch: noarch
%description
@@ -47,17 +57,30 @@ dos2unix README.md
%build
export PATH="$(pwd)/node_modules/.bin:$(pwd)/packages/pyright/node_modules/.bin:$PATH"
export NODEJS_MAJOR_VERSION=$(echo %nodejs_version | sed 's/\..*//')
%if 0%{?suse_version}
export npm_config_nodedir="%{_includedir}/node${NODEJS_MAJOR_VERSION}"
%else
export npm_config_nodedir="%{_includedir}/node"
%endif
export npm_config_build_from_source=true
export CFLAGS="%{optflags} -I${npm_config_nodedir}"
export CXXFLAGS="%{optflags} -I${npm_config_nodedir}"
### Rebuild node modules from source
pushd node_modules
npm rebuild
popd
pushd packages/%{pkg_name}
pushd packages/%{pkg_name}/
npm run build
popd
%install
export NODEJS_DEFAULT_VER=$(echo %nodejs_version | sed 's/\..*//')
install -d -m 0755 %{buildroot}%{_prefix}/lib/node_modules/%{pkg_name}/
sed -i 's#!/usr/bin/env node#!/usr/bin/node#' packages/%{pkg_name}/index.js

View File

@@ -1,22 +1,22 @@
#!/bin/bash
PYRIGHT_URL=$(rpmspec -P *.spec | grep Source0 | sed -e 's/Source0:[ ]*//g')
PYRIGHT_TARBALL=$(basename $PYRIGHT_URL)
PYRIGHT_TARBALL=$(basename ${PYRIGHT_URL})
PYRIGHT_PKGVERSION=$(rpmspec -P *.spec | grep ^Version | sed -e 's/Version:[ ]*//g')
PYRIGHT_PKGNAME="pyright"
PYRIGHT_PKGDIR="$(pwd)"
PYRIGHT_TMPDIR=$(mktemp --tmpdir -d pyright-XXXXXXXX)
PYRIGHT_PATH="$PYRIGHT_TMPDIR/$PYRIGHT_PKGNAME-$PYRIGHT_PKGVERSION"
PYRIGHT_PATH="${PYRIGHT_TMPDIR}/${PYRIGHT_PKGNAME}-${PYRIGHT_PKGVERSION}"
echo "URL: $PYRIGHT_URL"
echo "TARBALL: $PYRIGHT_TARBALL"
echo "NAME: $PYRIGHT_PKGNAME"
echo "VERSION: $PYRIGHT_PKGVERSION"
echo "PATH: $PYRIGHT_PATH"
echo "URL: ${PYRIGHT_URL}"
echo "TARBALL: ${PYRIGHT_TARBALL}"
echo "NAME: ${PYRIGHT_PKGNAME}"
echo "VERSION: ${PYRIGHT_PKGVERSION}"
echo "PATH: ${PYRIGHT_PATH}"
cleanup_tmpdir() {
popd 2>/dev/null
rm -rf $PYRIGHT_TMPDIR
popd 2>/dev/null || true
rm -rf "${PYRIGHT_TMPDIR}"
}
trap cleanup_tmpdir SIGINT
@@ -25,42 +25,55 @@ cleanup_and_exit() {
if test "$1" = 0 -o -z "$1" ; then
exit 0
else
exit $1
exit "$1"
fi
}
if [ ! -w "$PYRIGHT_TARBALL" ]; then
wget "$PYRIGHT_URL"
if [ ! -w "${PYRIGHT_TARBALL}" ]; then
wget "${PYRIGHT_URL}"
fi
tar -xf $PYRIGHT_TARBALL -C $PYRIGHT_TMPDIR
tar -xf "${PYRIGHT_TARBALL}" -C "${PYRIGHT_TMPDIR}"
pushd $PYRIGHT_PATH
pushd "$PYRIGHT_PATH" || cleanup_and_exit 1
NODEJS_VERSION="$(node -v | sed 's/v//')"
NODEJS_MAJOR_VERSION="${NODEJS_VERSION/\.*/}"
export npm_config_nodedir="/usr/include/node${NODEJS_MAJOR_VERSION}"
export npm_config_build_from_source=true
export CFLAGS="-I${npm_config_nodedir}"
export CXXFLAGS="-I${npm_config_nodedir}"
echo ">>>>>> Install npm modules"
npm clean-install
if [ $? -ne 0 ]; then
npm run install:all
ret=$?
if [ ${ret} -ne 0 ]; then
echo "ERROR: npm install failed"
cleanup_and_exit 1
fi
# echo ">>>>>> Audit npm modules"
npm audit
# echo ">>>>>> Fix npm modules"
# npm audit fix
# if [ $? -ne 0 ]; then
# echo "ERROR: npm audit failed"
# cleanup_and_exit 1
# fi
npm audit fix
ret=$?
if [ ${ret} -ne 0 ]; then
echo "ERROR: npm audit failed"
cleanup_and_exit 1
fi
echo ">>>>>> Cleanup object dirs"
find node_modules/ -type d -name "*.o.d" | xargs rm -rf
find node_modules/ -type d -name "__pycache__" | xargs rm -rf
find node_modules/ -type d -name "*.o.d" -print0 | xargs -0 rm -rf
find node_modules/ -type d -name "__pycache__" -print0 | xargs -0 rm -rf
echo ">>>>>> Cleanup object files"
find node_modules/ -name "*.node" | xargs rm -rf
# find node_modules/ -name "*.node" -print0 | xargs -0 rm -rf
find node_modules/ -name "*.dll" | grep -v signal-client | xargs rm -f
find node_modules/ -name "*.dylib" -delete
@@ -69,7 +82,7 @@ find node_modules/ -name "*.o" -delete
find node_modules/ -name "*.a" -delete
find node_modules/ -name "*.snyk-*.flag" -delete
find node_modules/ -name "builderror.log" -delete
find node_modules/ -name ".deps" -type d | xargs rm -rf
find node_modules/ -name ".deps" -type d -print0 | xargs -0 rm -rf
echo ">>>>>> Cleanup build info"
@@ -80,12 +93,13 @@ find node_modules/ -name "package.json" -exec sed -i "s#$PYRIGHT_PATH#/tmp#g" {}
echo ">>>>>> Package vendor files"
rm -f $PYRIGHT_PKGDIR/vendor.tar.xz
XZ_OPT="-T$(nproc)" tar cJf $PYRIGHT_PKGDIR/vendor.tar.xz node_modules packages/pyright/node_modules packages/pyright-internal/node_modules packages/vscode-pyright/node_modules
if [ $? -ne 0 ]; then
rm -f "${PYRIGHT_PKGDIR}/${PYRIGHT_PKGNAME}-${PYRIGHT_PKGVERSION}-vendor.tar.zst"
XZ_OPT="-T$(nproc)" tar --zstd -cf "${PYRIGHT_PKGDIR}/${PYRIGHT_PKGNAME}-${PYRIGHT_PKGVERSION}-vendor.tar.zst" node_modules packages/pyright/node_modules packages/pyright-internal/node_modules packages/vscode-pyright/node_modules
ret=$?
if [ $ret -ne 0 ]; then
cleanup_and_exit 1
fi
popd
popd || cleanup_and_exit 1
cleanup_and_exit 0

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dee50864e8d6eb2eb19ecf83dd9a9c6a668ee94201b10d733e28f96e812b195b
size 1734884

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:89418983269f22b85af914d6a0910dbf5afdf7db01024843658916dd1a98b42d
size 102400119

3
pyright-1.1.369.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0027f6c174b6cbcbe44e455cd99fca24b01bf71442126cd2bbc6c2d164a0add3
size 4065914

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9462ccfab490aea6d1afc1b29ee0af5b5892a275e96a2dd8e03c6814c4ead011
size 48564784