Page MenuHomeFreeBSD

devel/py-gitosis: Update to 0.3 and limit to Python 2.7
ClosedPublic

Authored by kai on Feb 27 2019, 10:50 AM.

Details

Summary

The package is not compatible with Python 3 and emits errors like:

2352, in resolve

  module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.6/site-packages/gitosis/serve.py", line 142
  util.mkdir(p, 0750)

While I'm here:

  • Add location to license file
  • Update URL in pkg-message
  • Add test target with the required dependencies
  • Pet portlint

Changelog:

https://github.com/tv42/gitosis/releases/tag/release%2F0.3

PR: 235441 [1], 235894 [2]
Reported by: Dan McGrath [1]
Submitted by: Keith Gaughan [2]
Approved by: (one of the mentors), maintainer timeout (> ~25 days) [1], maintainer [2]

Test Plan
  • poudriere (11.2-, 12.0-RELEASE, 13.0-CURRENT@r344112 amd64 + i386) -> OK
  • portlint -> OK
  • Tests using devel/py-pytest -> OK with py27, 9 Errors with py36

Excerpt of errors with py36:

ImportError while importing test module '/wrkdirs/usr/ports/devel/py-gitosis/work-py36/gitosis-release-0.3/gitosis/test/test_ssh.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
gitosis/test/test_ssh.py:4: in <module>

from cStringIO import StringIO

E ModuleNotFoundError: No module named 'cStringIO'

/usr/local/lib/python3.6/site-packages/_pytest/python.py:468: in _importtestmodule

mod = self.fspath.pyimport(ensuresyspath=importmode)

/usr/local/lib/python3.6/site-packages/py/_path/local.py:701: in pyimport

__import__(modname)

E File "/wrkdirs/usr/ports/devel/py-gitosis/work-py36/gitosis-release-0.3/gitosis/test/test_serve.py", line 357
E util.check_mode(foo, 0750, is_dir=True)
E ^
E SyntaxError: invalid token

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kai created this revision.Feb 27 2019, 10:50 AM
kai updated this revision to Diff 54472.Feb 27 2019, 11:27 AM

Forgot to add files/patch-setup.py

miwi accepted this revision.Feb 28 2019, 11:34 AM

LGTM

This revision is now accepted and ready to land.Feb 28 2019, 11:34 AM
This revision was automatically updated to reflect the committed changes.