Skip to content

Commit e84a43e

Browse files
committed
py-ruff: update candidate, doesn't build
1 parent e7eee8b commit e84a43e

File tree

9 files changed

+1628
-0
lines changed

9 files changed

+1628
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4479,6 +4479,7 @@ SUBDIR+= py-rpncalc
44794479
SUBDIR+= py-rql
44804480
SUBDIR+= py-rst2html5
44814481
SUBDIR+= py-rtree
4482+
SUBDIR+= py-ruff
44824483
SUBDIR+= py-ruffus
44834484
SUBDIR+= py-rxpy3
44844485
SUBDIR+= py-sabctools

py-ruff/ALTERNATIVES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin/ruff @PREFIX@/bin/ruff-@PYVERSSUFFIX@

py-ruff/DESCR

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Ruff is an extremely fast Python linter, written in Rust.
2+
3+
Ruff aims to be orders of magnitude faster than alternative tools
4+
while integrating more functionality behind a single, common
5+
interface.
6+
7+
Ruff can be used to replace Flake8 (plus dozens of plugins), isort,
8+
pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while
9+
executing tens or hundreds of times faster than any individual
10+
tool.

py-ruff/Makefile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# $NetBSD: Makefile,v 1.37 2024/09/15 08:28:39 adam Exp $
2+
3+
DISTNAME= ruff-0.6.6
4+
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5+
CATEGORIES= devel python
6+
MASTER_SITES= ${MASTER_SITE_PYPI:=r/ruff/}
7+
8+
MAINTAINER= pkgsrc-users@NetBSD.org
9+
HOMEPAGE= https://github.com/astral-sh/ruff
10+
COMMENT= Extremely fast Python linter, written in Rust
11+
LICENSE= mit
12+
13+
TOOL_DEPENDS+= ${PYPKGPREFIX}-maturin>=1.7.1:../../devel/py-maturin
14+
15+
USE_LANGUAGES= c c++
16+
17+
# for tikv-jemalloc-sys
18+
USE_TOOLS+= gmake
19+
20+
# Depends on an unpublished crate. Can't use cargo.mk to fetch it.
21+
LSP_TYPES_REV= 3512a9f33eadc5402cfab1b8f7340824c8ca1439
22+
SALSA_REV= f608ff8b24f07706492027199f51132244034f29
23+
DISTFILES= ${DEFAULT_DISTFILES}
24+
DISTFILES+= lsp-types-${LSP_TYPES_REV}.tar.gz
25+
DISTFILES+= salsa-${SALSA_REV}.tar.gz
26+
27+
SITES.lsp-types-${LSP_TYPES_REV}.tar.gz+= -${MASTER_SITE_GITHUB:=astral-sh/}lsp-types/archive/${LSP_TYPES_REV}.tar.gz
28+
SITES.salsa-${SALSA_REV}.tar.gz+= -${MASTER_SITE_GITHUB:=salsa-rs/}salsa/archive/${SALSA_REV}.tar.gz
29+
30+
MAKE_ENV+= CARGO_NET_OFFLINE=true
31+
32+
post-extract:
33+
${MV} ${WRKDIR}/lsp-types* ${WRKSRC}
34+
35+
post-install:
36+
cd ${DESTDIR}${PREFIX}/bin && \
37+
${MV} ruff ruff-${PYVERSSUFFIX} || ${TRUE}
38+
39+
.include "cargo-depends.mk"
40+
41+
.include "../../lang/python/wheel.mk"
42+
.include "../../lang/rust/cargo.mk"
43+
.include "../../mk/bsd.pkg.mk"

py-ruff/PLIST

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@comment $NetBSD: PLIST,v 1.2 2024/08/22 13:33:16 wiz Exp $
2+
bin/ruff-${PYVERSSUFFIX}
3+
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
4+
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
5+
${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
6+
${PYSITELIB}/${WHEEL_INFODIR}/licenses/LICENSE
7+
${PYSITELIB}/ruff/__init__.py
8+
${PYSITELIB}/ruff/__init__.pyc
9+
${PYSITELIB}/ruff/__init__.pyo
10+
${PYSITELIB}/ruff/__main__.py
11+
${PYSITELIB}/ruff/__main__.pyc
12+
${PYSITELIB}/ruff/__main__.pyo

py-ruff/TODO

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
===> Building for py312-ruff-0.6.6
2+
* Building wheel...
3+
Running `maturin-3.12 pep517 build-wheel -i /usr/pkg/bin/python3.12 --compatibility off`
4+
error: failed to load manifest for workspace member `/scratch/devel/py-ruff/work/ruff-0.6.6/crates/red_knot_python_semantic`
5+
referenced by workspace at `/scratch/devel/py-ruff/work/ruff-0.6.6/Cargo.toml`
6+
7+
Caused by:
8+
failed to load manifest for dependency `ruff_db`
9+
10+
Caused by:
11+
failed to load manifest for dependency `salsa`
12+
13+
Caused by:
14+
failed to read `/scratch/devel/py-ruff/work/ruff-0.6.6/salsa-rs-f608ff8b24f07706492027199f51132244034f29/Cargo.toml`
15+
16+
Caused by:
17+
No such file or directory (os error 2)
18+
💥 maturin failed
19+
Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
20+
Caused by: `cargo metadata` exited with an error:
21+
Error: command ['maturin-3.12', 'pep517', 'build-wheel', '-i', '/usr/pkg/bin/python3.12', '--compatibility', 'off'] returned non-zero exit status 1
22+
23+
ERROR Backend subprocess exited when trying to invoke build_wheel
24+
*** Error code 1

0 commit comments

Comments
 (0)