File: lock-requirements.sh

package info (click to toggle)
pytest-mypy-testing 0.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 1,151; sh: 13; makefile: 2
file content (29 lines) | stat: -rwxr-xr-x 683 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

# SPDX-FileCopyrightText: David Fritzsche
# SPDX-License-Identifier: CC0-1.0

export CUSTOM_COMPILE_COMMAND="./lock-requirements.sh"

export PYTHONWARNINGS=ignore

pip-compile \
    --unsafe-package='' \
    --no-emit-index-url \
    --resolver=backtracking \
    -o requirements.txt \
    requirements.in \
    "$@"

cat >constraints.txt <<EOF
# SPDX-FileCopyrightText: David Fritzsche
# SPDX-License-Identifier: CC0-1.0
#
# This file is autogenerated by lock-requirements.sh
# To update, run:
#
#    ./lock-requirements.sh
#
EOF
sed -E -e 's/(\[.*\])//g' -e  '/^ *#/d' -e '/^$/d' requirements.txt >>constraints.txt
cat constraints.in | grep -v -E '^#' >>constraints.txt