mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-06 11:26:55 -05:00
gnu: Add python-libcst-minimal.
* gnu/packages/python-xyz.scm (python-libcst-minimal): New variable. (python-libcst): Add a tests? argument to the check phase override and strip trailing #t.
This commit is contained in:
parent
255fc0898d
commit
9d44234960
1 changed files with 12 additions and 5 deletions
|
@ -13185,17 +13185,16 @@ (define-public python-libcst
|
||||||
(delete-file "libcst/tests/test_pyre_integration.py")
|
(delete-file "libcst/tests/test_pyre_integration.py")
|
||||||
(delete-file "libcst/codemod/tests/test_codemod_cli.py")
|
(delete-file "libcst/codemod/tests/test_codemod_cli.py")
|
||||||
(delete-file "libcst/metadata/tests/test_full_repo_manager.py")
|
(delete-file "libcst/metadata/tests/test_full_repo_manager.py")
|
||||||
(delete-file "libcst/metadata/tests/test_type_inference_provider.py")
|
(delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
|
||||||
#t))
|
|
||||||
(add-before 'check 'generate-test-data
|
(add-before 'check 'generate-test-data
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
|
(setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
|
||||||
(invoke "python" "-m" "libcst.codegen.generate" "visitors")
|
(invoke "python" "-m" "libcst.codegen.generate" "visitors")
|
||||||
(invoke "python" "-m" "libcst.codegen.generate" "return_types")))
|
(invoke "python" "-m" "libcst.codegen.generate" "return_types")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(invoke "python" "-m" "unittest")
|
(when tests?
|
||||||
#t)))))
|
(invoke "python" "-m" "unittest")))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("python-black" ,python-black)
|
`(("python-black" ,python-black)
|
||||||
("python-isort" ,python-isort)))
|
("python-isort" ,python-isort)))
|
||||||
|
@ -13220,6 +13219,14 @@ (define-public python-libcst
|
||||||
;; libcst/_add_slots.py
|
;; libcst/_add_slots.py
|
||||||
license:asl2.0))))
|
license:asl2.0))))
|
||||||
|
|
||||||
|
(define-public python-libcst-minimal
|
||||||
|
(hidden-package
|
||||||
|
(package
|
||||||
|
(inherit python-libcst)
|
||||||
|
(name "python-libcst-minimal")
|
||||||
|
(arguments '(#:tests? #f))
|
||||||
|
(native-inputs '()))))
|
||||||
|
|
||||||
(define-public python-typing-inspect
|
(define-public python-typing-inspect
|
||||||
(package
|
(package
|
||||||
(name "python-typing-inspect")
|
(name "python-typing-inspect")
|
||||||
|
|
Loading…
Reference in a new issue