Make reqsort its own thing
This commit is contained in:
parent
bcacdd70c1
commit
aef66f2e77
3 changed files with 11 additions and 0 deletions
7
projects/reqsort/BUILD
Normal file
7
projects/reqsort/BUILD
Normal file
|
@ -0,0 +1,7 @@
|
|||
py_binary(
|
||||
name = "reqsort",
|
||||
main = "__main__.py",
|
||||
deps = [
|
||||
py_requirement("click"),
|
||||
]
|
||||
)
|
3
projects/reqsort/README.md
Normal file
3
projects/reqsort/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# reqsort
|
||||
|
||||
A `requirements.txt` formatter and sorter.
|
|
@ -6,6 +6,7 @@ import re
|
|||
|
||||
import click
|
||||
|
||||
|
||||
REQ_PATTERN = re.compile(
|
||||
r"(?P<pkgname>[a-zA-Z0-9_-]+)(?P<features>\[.*?\])?==(?P<version>[^\s;#]+)|(.*?#egg=(?P<eggname>[a-zA-Z0-9_-]+))"
|
||||
)
|
Loading…
Reference in a new issue