mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-11 07:22:22 +00:00
Stop using the deprecated sha module. Instead use hashlib. Since
hashlib was introduced in 2.5, change the USE_PYTHON setting to require it. Feature safe: yes
This commit is contained in:
parent
b5d9bd6311
commit
16573d7caf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=267683
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= ${PYDISTUTILS_PKGNAME:S;^Trac;;S;Plugin$;;:L}
|
PORTNAME= ${PYDISTUTILS_PKGNAME:S;^Trac;;S;Plugin$;;:L}
|
||||||
PORTVERSION= 0.7.4
|
PORTVERSION= 0.7.4
|
||||||
PORTREVISION= 4
|
PORTREVISION= 5
|
||||||
CATEGORIES= www devel graphics python
|
CATEGORIES= www devel graphics python
|
||||||
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||||
MASTER_SITE_SUBDIR= brooks
|
MASTER_SITE_SUBDIR= brooks
|
||||||
@ -22,7 +22,7 @@ RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/URW/fonts.dir:${PORTSDIR}/x11-fonts/urw
|
|||||||
tracd:${PORTSDIR}/www/trac
|
tracd:${PORTSDIR}/www/trac
|
||||||
BUILD_DEPENDS+= easy_install:${PORTSDIR}/devel/py-setuptools
|
BUILD_DEPENDS+= easy_install:${PORTSDIR}/devel/py-setuptools
|
||||||
|
|
||||||
USE_PYTHON= yes
|
USE_PYTHON= 2.5+
|
||||||
NO_BUILD= yes
|
NO_BUILD= yes
|
||||||
USE_PYDISTUTILS=yes
|
USE_PYDISTUTILS=yes
|
||||||
PYDISTUTILS_PKGNAME= graphviz
|
PYDISTUTILS_PKGNAME= graphviz
|
||||||
|
@ -3,6 +3,19 @@ $FreeBSD$
|
|||||||
|
|
||||||
--- graphviz/graphviz.py.orig
|
--- graphviz/graphviz.py.orig
|
||||||
+++ graphviz/graphviz.py
|
+++ graphviz/graphviz.py
|
||||||
|
@@ -16,11 +16,11 @@
|
||||||
|
__version__ = '0.7.2'
|
||||||
|
|
||||||
|
|
||||||
|
+import hashlib
|
||||||
|
import inspect
|
||||||
|
import locale
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
-import sha
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
@@ -59,10 +59,7 @@
|
@@ -59,10 +59,7 @@
|
||||||
'c:\\Program Files\\ATT\\Graphviz\\bin',
|
'c:\\Program Files\\ATT\\Graphviz\\bin',
|
||||||
],
|
],
|
||||||
@ -15,3 +28,12 @@ $FreeBSD$
|
|||||||
],
|
],
|
||||||
|
|
||||||
'darwin': ['/opt/local/bin',
|
'darwin': ['/opt/local/bin',
|
||||||
|
@@ -312,7 +309,7 @@
|
||||||
|
encoded_cmd = (processor + unicode(self.processor_options)) \
|
||||||
|
.encode(self.encoding)
|
||||||
|
encoded_content = content.encode(self.encoding)
|
||||||
|
- sha_key = sha.new(encoded_cmd + encoded_content).hexdigest()
|
||||||
|
+ sha_key = hashlib.sha1(encoded_cmd + encoded_content).hexdigest()
|
||||||
|
img_name = '%s.%s.%s' % (sha_key, processor, out_format)
|
||||||
|
# cache: hash.<dot>.<png>
|
||||||
|
img_path = os.path.join(self.cache_dir, img_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user