mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
devel/py-mypy: add new port
Mypy is an optional static type checker for Python. You can add type hints to your Python programs using the standard for type annotations introduced in Python 3.5 (PEP 484), and use mypy to type check them statically. Find bugs in your programs without even running them! PR: 209871 Submitted by: Florian Limberger (flo@snakeoilproductions.net)
This commit is contained in:
parent
4697815c0f
commit
5992ee550f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434504
@ -4410,6 +4410,7 @@
|
||||
SUBDIR += py-mwlib.rl
|
||||
SUBDIR += py-mx-experimental
|
||||
SUBDIR += py-mygpoclient
|
||||
SUBDIR += py-mypy
|
||||
SUBDIR += py-nagioscheck
|
||||
SUBDIR += py-natsort
|
||||
SUBDIR += py-natural
|
||||
|
29
devel/py-mypy/Makefile
Normal file
29
devel/py-mypy/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
# Created by: Florian Limberger <flo@snakeoilproductions.net>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mypy
|
||||
PORTVERSION= 0.471
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= flo@snakeoilproductions.net
|
||||
COMMENT= Optional static typing for Python
|
||||
|
||||
LICENSE= MIT PSFL
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}typed-ast>=0.6.3:devel/py-typed-ast
|
||||
|
||||
NO_ARCH= yes
|
||||
USES= python:3.3+
|
||||
USE_PYTHON= autoplist distutils
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PYTHON_VER} < 3.5
|
||||
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing>=3.5.3:devel/py-typing
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
devel/py-mypy/distinfo
Normal file
3
devel/py-mypy/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1487173104
|
||||
SHA256 (mypy-0.471.tar.gz) = 552821e4ae601e9058797cfc7d251ff6a2789b5b5aeb00df017f76271d726e9f
|
||||
SIZE (mypy-0.471.tar.gz) = 660228
|
11
devel/py-mypy/files/patch-mypy_fastparse.py
Normal file
11
devel/py-mypy/files/patch-mypy_fastparse.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- mypy/fastparse.py.orig 2017-02-15 15:30:38 UTC
|
||||
+++ mypy/fastparse.py
|
||||
@@ -26,7 +26,7 @@ from mypy import experiments
|
||||
from mypy.errors import Errors
|
||||
|
||||
try:
|
||||
- from typed_ast import ast35
|
||||
+ from typed_ast import ast3 as ast35
|
||||
except ImportError:
|
||||
if sys.version_info.minor > 2:
|
||||
print('You must install the typed_ast package before you can run mypy'
|
11
devel/py-mypy/files/patch-mypy_fastparse2.py
Normal file
11
devel/py-mypy/files/patch-mypy_fastparse2.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- mypy/fastparse2.py.orig 2017-02-15 15:30:42 UTC
|
||||
+++ mypy/fastparse2.py
|
||||
@@ -43,7 +43,7 @@ from mypy.fastparse import TypeConverter
|
||||
|
||||
try:
|
||||
from typed_ast import ast27
|
||||
- from typed_ast import ast35
|
||||
+ from typed_ast import ast3 as ast35
|
||||
except ImportError:
|
||||
if sys.version_info.minor > 2:
|
||||
print('You must install the typed_ast package before you can run mypy'
|
6
devel/py-mypy/pkg-descr
Normal file
6
devel/py-mypy/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
||||
Mypy is an optional static type checker for Python. You can add type hints to
|
||||
your Python programs using the standard for type annotations introduced in
|
||||
Python 3.5 (PEP 484), and use mypy to type check them statically. Find bugs in
|
||||
your programs without even running them!
|
||||
|
||||
WWW: http://www.mypy-lang.org
|
Loading…
Reference in New Issue
Block a user