Bug 227162 - net-mgmt/py-ciscoconfparse: Update to 1.3.11
Summary: net-mgmt/py-ciscoconfparse: Update to 1.3.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-01 08:32 UTC by Kai Knoblich
Modified: 2018-04-03 00:51 UTC (History)
3 users (show)

See Also:
kai: maintainer-feedback+


Attachments
py-ciscoconfparse-1.3.11.patch (1.58 KB, patch)
2018-04-01 08:32 UTC, Kai Knoblich
kai: maintainer-approval+
Details | Diff
py-ciscoconfparse-1.3.11_revision2.patch (1.83 KB, patch)
2018-04-01 22:24 UTC, Kai Knoblich
kai: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Knoblich freebsd_committer freebsd_triage 2018-04-01 08:32:51 UTC
Created attachment 192039 [details]
py-ciscoconfparse-1.3.11.patch

Hello,

attached is the patch for the Python package py-ciscoconfparse 1.3.11 .

Changes to the port:
- added www/py-Flask and textproc/py-wtforms as additional dependencies (required by module ccp_flask.py but both dependencies are not listed in the given requirements.txt)

QA:
~~~
- poudriere (11.1-RELEASE amd64 + i386) for each py27 + py36 flavor -> OK
- portlint -> OK

--
Cheers
Kai
Comment 1 Danilo G. Baio freebsd_committer freebsd_triage 2018-04-01 13:25:58 UTC
Hi, thanks for your contribution!

Did you test it with Python 3?

This came to my attention:

setup.py:
  ## Conditionally require the correct ipaddr package in Python2 vs Python3
  if sys.version_info[0]<3:
      IPADDR = "ipaddr>=2.1.11"
      DNSPYTHON = "dnspython"
  else:
      IPADDR = "ipaddress"
      DNSPYTHON = "dnspython3"


It will be necessary something like this:

.include <bsd.port.pre.mk>

.if ${PYTHON_REL} < 3000
RUN_DEPENDS+=   ...
.else
RUN_DEPENDS+=   ...
.endif

.include <bsd.port.post.mk>



Could you test it? 

Regards.
Comment 2 Kai Knoblich freebsd_committer freebsd_triage 2018-04-01 14:09:20 UTC
(In reply to Danilo G. Baio from comment #1)

Hello Danilo,

good catch, thank you for your feedback!

I did some tests and everything seems to be ok with Python v3.6:

> Python 3.6.4 (default, Mar 16 2018, 14:11:06) 
> [GCC 4.2.1 Compatible FreeBSD Clang 4.0.0 (tags/RELEASE_400/final 297347)] on freebsd11
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from ciscoconfparse.ccp_util import dns_query
> >>> dns_query('localhost', 'A', '127.0.0.1')
> {<DNSResponse "A" error="The DNS query name does not exist: localhost.testbox.net.">}
> >>> from ciscoconfparse.ccp_util import IPv4Obj
> >>> net = IPv4Obj('192.168.1.0/24')
> >>> net
> <IPv4Obj 192.168.1.0/24>

As far I know the py-dnspython3 package is handled as an alias for py-dnspython, which has superseded the first one.

Python 3 has also its own internal ipaddress module which makes the RUN_DEPENDS of devel/py-ipaddr for the py36 flavor superfluous in that case.

If you like, I'll create a new patch which handles the RUN_DEPENDS for the devel/py-ipaddr package between the Python flavors?
--
Cheers
Kai
Comment 3 Kai Knoblich freebsd_committer freebsd_triage 2018-04-01 22:24:41 UTC
Created attachment 192081 [details]
py-ciscoconfparse-1.3.11_revision2.patch

Hello Danilo,

I have created a new patch which handles the RUN_DEPENDS depending of the used Python version.

The first version of my patch is still available - feel free to choose which version of the patches suits better to the ports tree.
--
Cheers
Kai
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-04-02 00:04:22 UTC
A commit references this bug:

Author: dbaio
Date: Mon Apr  2 00:03:19 UTC 2018
New revision: 466194
URL: https://svnweb.freebsd.org/changeset/ports/466194

Log:
  net-mgmt/py-ciscoconfparse: Update to 1.3.11

  Dependency devel/py-ipaddr is only necessary with Python 2.

  While here, update LICENSE.

  PR:		227162
  Submitted by:	Kai <freebsd_ports@k-worx.org> (maintainer)

Changes:
  head/net-mgmt/py-ciscoconfparse/Makefile
  head/net-mgmt/py-ciscoconfparse/distinfo
Comment 5 Danilo G. Baio freebsd_committer freebsd_triage 2018-04-02 00:06:30 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-04-03 00:51:39 UTC
A commit references this bug:

Author: dbaio
Date: Tue Apr  3 00:50:36 UTC 2018
New revision: 51529
URL: https://svnweb.freebsd.org/changeset/doc/51529

Log:
  Add Kai Knoblich to contributors

  Maintainer of:	devel/py-coreapi
  		devel/py-coreschema
  		devel/py-flex
  		devel/py-inflection
  		devel/py-itypes
  		devel/py-openapi-codec
  		devel/py-strict-rfc3339
  		devel/py-swagger-spec-validator
  		games/anki
  		mail/py-validate_email
  		net-mgmt/py-ciscoconfparse
  		net/remotebox
  		sysutils/bchunk
  		textproc/py-gfm
  		www/py-django-filter
  		www/py-django-js-asset
  		www/py-django-rest-swagger
  		www/py-django-timezone-field

  PR:		227162

Changes:
  head/en_US.ISO8859-1/articles/contributors/contrib.additional.xml