From 359fbb476830f753ccc344b428569a8a60660374 Mon Sep 17 00:00:00 2001 From: James Reynolds Date: Sun, 16 Apr 2023 08:16:04 -0600 Subject: [PATCH] +github.com/psf/black (#890) * +github.com/psf/black * Fixed blackd * Changed EXTRA_DEPS to OPTIONAL_DEPS * Switch from python-venv.sh and ENV VAR to python-venv.py and arg; better test --------- Co-authored-by: James Reynolds --- projects/github.com/psf/black/package.yml | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 projects/github.com/psf/black/package.yml diff --git a/projects/github.com/psf/black/package.yml b/projects/github.com/psf/black/package.yml new file mode 100644 index 00000000..7c97abb4 --- /dev/null +++ b/projects/github.com/psf/black/package.yml @@ -0,0 +1,24 @@ +distributable: + url: https://github.com/psf/black/archive/refs/tags/{{ version }}.tar.gz + strip-components: 1 + +versions: + github: psf/black/releases/tags + strip: /^v/ + +dependencies: + python.org: '>=3.7' + +build: + script: | + python-venv.py {{prefix}}/bin/black --extra d + cp {{prefix}}/bin/black {{prefix}}/bin/blackd + +provides: + - bin/black + - bin/blackd + +test: + script: | + test "$(black --version | grep black | sed 's/.*, \([^ ]*\) .*/\1/')" = "{{ version }}" + test "$(blackd --version | sed 's/.* //')" = "{{ version }}"