- Update to 4.0.0

- Remove dependency on Python 2.X (reported by [1])
- Use autoplist facility

PR:	249799
Submitted by:	swills  [1]
This commit is contained in:
Nicola Vitale 2020-09-30 07:41:14 +00:00
parent 907598f14b
commit ffb42a7be1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550652
4 changed files with 25 additions and 40 deletions

View file

@ -2,8 +2,8 @@
# $FreeBSD$
PORTNAME= urlgrabber
PORTVERSION= 3.10.2
PORTREVISION= 1
PORTVERSION= 4.0.0
PORTREVISION= 0
CATEGORIES= www python
MASTER_SITES= http://urlgrabber.baseurl.org/download/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -14,7 +14,11 @@ COMMENT= High-level cross-protocol url-grabber
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycurl>=7.19.0_1:ftp/py-pycurl@${PY_FLAVOR}
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.14.0:devel/py-six@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.14.0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycurl>=7.19.0_1:ftp/py-pycurl@${PY_FLAVOR}
USES= python shebangfix
DOCS_MAKE_ENV= INSTALL_DOCS=yes
DOCSDIR= ${PREFIX}/share/doc/${PYTHON_PKGNAMEPREFIX}${PORTNAME}
@ -25,10 +29,9 @@ REINPLACE_ARGS= -i.bak -e 's,%%DOCSDIR%%,${DOCSDIR},'
SHEBANG_FILES= scripts/urlgrabber-ext-down
USES= python:2.7 shebangfix
USE_PYTHON= distutils
USE_PYTHON= autoplist distutils
post-patch:
@${REINPLACE_CMD} ${WRKSRC}/${PYSETUP}
@${REINPLACE_CMD} ${REINPLACE_ARGS} ${WRKSRC}/${PYSETUP}
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1500803698
SHA256 (urlgrabber-3.10.2.tar.gz) = 53691185e3d462bb0fa8db853a205ee79cdd4089687cddd22cabb8b3d4280142
SIZE (urlgrabber-3.10.2.tar.gz) = 84700
TIMESTAMP = 1601416704
SHA256 (urlgrabber-4.0.0.tar.gz) = d152d10c7decce45ce5b44f8ee8ee5fd0047217f4152eebb8e0c552ca5137af0
SIZE (urlgrabber-4.0.0.tar.gz) = 86308

View file

@ -1,20 +1,22 @@
--- setup.py.orig 2017-07-23 09:57:14 UTC
--- setup.py.orig 2019-02-25 13:49:04 UTC
+++ setup.py
@@ -32,7 +32,6 @@ packages = ['urlgrabber']
@@ -1,4 +1,5 @@
# urlgrabber distutils setup
+import os
import re as _re
import sys as _sys
@@ -32,9 +33,12 @@ packages = ['urlgrabber']
package_dir = {'urlgrabber':'urlgrabber'}
scripts = ['scripts/urlgrabber']
data_files = [
- ('share/doc/' + name + '-' + version, ['README','LICENSE', 'TODO', 'ChangeLog']),
('libexec', ['scripts/urlgrabber-ext-down']),
]
options = { 'clean' : { 'all' : 1 } }
@@ -59,5 +58,9 @@ if __name__ == '__main__':
#print '%-20s -> %s' % (k, config[k])
if k.startswith('_'): del config[k]
+ import os
+ if os.environ.has_key('INSTALL_DOCS'):
+if (sys.version_info.major == 2 and os.environ.has_key('INSTALL_DOCS')) or \
+ (sys.version_info.major == 3 and os.environ.get('INSTALL_DOCS')):
+ data_files.append(('%%DOCSDIR%%', ['README', 'TODO', 'ChangeLog']))
+
from distutils.core import setup
setup(**config)
setup_requires = ['six']
install_requires = ['pycurl', 'six']
options = { 'clean' : { 'all' : 1 } }

View file

@ -1,20 +0,0 @@
bin/urlgrabber
%%PYTHON_SITELIBDIR%%/urlgrabber/__init__.py
%%PYTHON_SITELIBDIR%%/urlgrabber/__init__.pyc
%%PYTHON_SITELIBDIR%%/urlgrabber/__init__.pyo
%%PYTHON_SITELIBDIR%%/urlgrabber/byterange.py
%%PYTHON_SITELIBDIR%%/urlgrabber/byterange.pyc
%%PYTHON_SITELIBDIR%%/urlgrabber/byterange.pyo
%%PYTHON_SITELIBDIR%%/urlgrabber/grabber.py
%%PYTHON_SITELIBDIR%%/urlgrabber/grabber.pyc
%%PYTHON_SITELIBDIR%%/urlgrabber/grabber.pyo
%%PYTHON_SITELIBDIR%%/urlgrabber/mirror.py
%%PYTHON_SITELIBDIR%%/urlgrabber/mirror.pyc
%%PYTHON_SITELIBDIR%%/urlgrabber/mirror.pyo
%%PYTHON_SITELIBDIR%%/urlgrabber/progress.py
%%PYTHON_SITELIBDIR%%/urlgrabber/progress.pyc
%%PYTHON_SITELIBDIR%%/urlgrabber/progress.pyo
libexec/urlgrabber-ext-down
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TODO