Compare commits
10 Commits
d230f0761d
...
ae969a6859
Author | SHA256 | Date | |
---|---|---|---|
|
ae969a6859 | ||
|
da2c51bc98 | ||
|
e0fe03019b | ||
|
a890f4b400 | ||
|
43bedb70ba | ||
|
62ee18941f | ||
|
717a6d572d | ||
|
c3a5b0a563 | ||
|
2596dd9cf3 | ||
|
d21f585f7a |
@@ -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>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dee50864e8d6eb2eb19ecf83dd9a9c6a668ee94201b10d733e28f96e812b195b
|
||||
size 1734884
|
3
pyright-1.1.369-vendor.tar.zst
Normal file
3
pyright-1.1.369-vendor.tar.zst
Normal 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
3
pyright-1.1.369.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0027f6c174b6cbcbe44e455cd99fca24b01bf71442126cd2bbc6c2d164a0add3
|
||||
size 4065914
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9462ccfab490aea6d1afc1b29ee0af5b5892a275e96a2dd8e03c6814c4ead011
|
||||
size 48564784
|
Reference in New Issue
Block a user