1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00

textproc/py-sphinxcontrib-bitbucket: Fix Python 3 build/run

Fix Python 3 build, identified while testing devel/py-virtualenvwrapper:

Exception occurred:
  File "/usr/local/lib/python3.7/site-packages/sphinx/registry.py", line 196, in load_extension
    mod = __import__(extname, None, None, ['setup'])
  File "/usr/local/lib/python3.7/site-packages/sphinxcontrib/bitbucket.py", line 26
    except AttributeError, err:
                         ^
SyntaxError: invalid syntax

While I'm here, level up ports/python compliance:

  - Add python to CATEGORIES
  - Add LICENSE/LICENSE_FILE
  - Add NO_ARCH
  - Add missing RUN_DEPENDS
  - Correct RUN_DEPENDS version-specs

Approved by:	portmgr (blanket(s): build fix, ports compliance, dependencies)
MFH:		2019Q3
This commit is contained in:
Kubilay Kocak 2019-08-12 01:11:25 +00:00
parent 0297371193
commit eb9b6ef201
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=508699
3 changed files with 25 additions and 6 deletions

View File

@ -3,17 +3,23 @@
PORTNAME= sphinxcontrib-bitbucket
PORTVERSION= 1.0
PORTREVISION= 1
CATEGORIES= textproc
PORTREVISION= 2
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= nivit@FreeBSD.org
COMMENT= Sphinx/BitBucket integration
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.1.3:textproc/py-sphinx@${PY_FLAVOR}
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0.6:textproc/py-sphinx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}docutils>=0.6:textproc/py-docutils@${PY_FLAVOR}
USES= python
USE_PYTHON= distutils autoplist
NO_ARCH= yes
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
--- ./setup.py.orig 2012-08-20 21:53:58.000000000 +0200
+++ ./setup.py 2012-08-20 21:54:10.000000000 +0200
--- setup.py.orig 2011-04-24 16:19:59 UTC
+++ setup.py
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-
@ -10,7 +10,7 @@
from setuptools import setup, find_packages
try:
@@ -43,5 +39,4 @@
@@ -43,5 +39,4 @@ setup(
include_package_data=True,
install_requires=requires,
namespace_packages=['sphinxcontrib'],

View File

@ -0,0 +1,13 @@
# Fix Python 3 build
--- sphinxcontrib/bitbucket.py.orig 2019-08-11 09:19:09 UTC
+++ sphinxcontrib/bitbucket.py
@@ -23,7 +23,7 @@ def make_link_node(rawtext, app, type, slug, options):
base = app.config.bitbucket_project_url
if not base:
raise AttributeError
- except AttributeError, err:
+ except AttributeError as err:
raise ValueError('bitbucket_project_url configuration value is not set (%s)' % str(err))
#
slash = '/' if base[-1] != '/' else ''