Re: NEW: textproc/qrcode

2018-05-17 Thread Ingo Feinerer
On Sun, May 13, 2018 at 12:33:56PM +0200, Klemens Nanni wrote:
> On Sun, May 13, 2018 at 07:55:37AM +0200, Ingo Feinerer wrote:
> > Done. But there is one problem now which I am unsure about:
> > Both flavors install bin/qr and man/man1/qr.1; isn't that a conflict?
> > If yes, what is the best strategy to solve this?
> Usually, the python3 FLAVOR installs with a different suffix; the idiom
> is:
> 
>   post-install:
>   mv foo foo${MODPY_BIN_SUFFIX}

Thanks for the pointer. Modified port attached.

OK?

Best regards,
Ingo


py-qrcode.tar.gz
Description: application/tar-gz


Re: NEW: textproc/qrcode

2018-05-13 Thread Klemens Nanni
On Sun, May 13, 2018 at 07:55:37AM +0200, Ingo Feinerer wrote:
> Done. But there is one problem now which I am unsure about:
> Both flavors install bin/qr and man/man1/qr.1; isn't that a conflict?
> If yes, what is the best strategy to solve this?
Usually, the python3 FLAVOR installs with a different suffix; the idiom
is:

post-install:
mv foo foo${MODPY_BIN_SUFFIX}



Re: NEW: textproc/qrcode

2018-05-12 Thread Ingo Feinerer
On Sat, May 12, 2018 at 11:33:11AM +0200, Klemens Nanni wrote:
> On Sat, May 12, 2018 at 10:27:20AM +0200, Ingo Feinerer wrote:
> > please find attached a port for qrcode, a pure python QR Code generator:
> > https://github.com/lincolnloop/python-qrcode
> Looks good, but some tests fail, test.log attached.

Yes. pymaging is missing (not in ports tree as Ljuba Nedeljkovic
mentioned). I have no immediate plans to port it but think activated
(partly failing) tests are better than NO_TEST.

> I'd patch setup.py, `sed -i' always seems dirty to me except for bulk
> cases where you want to avoid all the patch churn for the same
> substitution across lots of files.

Done.

> With COMMENT, DISTNAME and CATEGORIES column aligned, it's a tad easier to
> read, imho.

Done. (The indentation comes from
infrastructure/templates/Makefile.template which I try to adhere to
typically.)

> On 2018/05/12 08:50, Daniel Jakots wrote:
> > Also the README shows it can be used as a library, wouldn't it make
> > more sense to name the port py-qrcode and provide both python flavours?

Done. But there is one problem now which I am unsure about:
Both flavors install bin/qr and man/man1/qr.1; isn't that a conflict?
If yes, what is the best strategy to solve this?

Thanks all for the input.

Best regards,
Ingo


py-qrcode.tar.gz
Description: application/tar-gz


Re: NEW: textproc/qrcode

2018-05-12 Thread Ljuba Nedeljkovic
On 12.05, Klemens Nanni wrote:
> On Sat, May 12, 2018 at 11:33:11AM +0200, Klemens Nanni wrote:
> > On Sat, May 12, 2018 at 10:27:20AM +0200, Ingo Feinerer wrote:
> > > please find attached a port for qrcode, a pure python QR Code generator:
> > > https://github.com/lincolnloop/python-qrcode
> > Looks good, but some tests fail, test.log attached.
> ... here it is.

> running test
> running egg_info
> writing qrcode.egg-info/PKG-INFO
> writing dependency_links to qrcode.egg-info/dependency_links.txt
> writing entry points to qrcode.egg-info/entry_points.txt
> writing requirements to qrcode.egg-info/requires.txt
> writing top-level names to qrcode.egg-info/top_level.txt
> reading manifest file 'qrcode.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> writing manifest file 'qrcode.egg-info/SOURCES.txt'
> running build_ext
> test_bad_factory (qrcode.tests.test_script.ScriptTest) ... ok
> test_factory (qrcode.tests.test_script.ScriptTest) ... ok
> test_isatty (qrcode.tests.test_script.ScriptTest) ... ok
> test_optimize (qrcode.tests.test_script.ScriptTest) ... ok
> test_piped (qrcode.tests.test_script.ScriptTest) ... ok
> test_stdin (qrcode.tests.test_script.ScriptTest) ... ok
> test_stdin_py3_unicodedecodeerror (qrcode.tests.test_script.ScriptTest) ... ok
> test_change (qrcode.tests.test_release.UpdateManpageTests) ... 
> /usr/local/lib/python3.6/re.py:212: FutureWarning: split() requires a 
> non-empty pattern match.
>   return _compile(pattern, flags).split(string, maxsplit)
> ok
> test_invalid_data (qrcode.tests.test_release.UpdateManpageTests) ... FAIL
> test_no_change (qrcode.tests.test_release.UpdateManpageTests) ... FAIL
> test_not_qrcode (qrcode.tests.test_release.UpdateManpageTests) ... ok
> test_add_qrdata (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_basic (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_fit (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_get_matrix (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_get_matrix_border (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_invalid_version (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_large (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_8bit (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_8bit_newline (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_alpha (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_number (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_negative_size_at_construction (qrcode.tests.test_qrcode.QRCodeTests) ... 
> ok
> test_negative_size_at_usage (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_optimize (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_optimize_short (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_optimize_size (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_overflow (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_ascii (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_ascii_stdout (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_tty (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_tty_stdout (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_qrcode_bad_factory (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_qrcode_factory (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_qrdata_repr (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_regression_mode_comma (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_pil (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_pymaging_png (qrcode.tests.test_qrcode.QRCodeTests) ... skipped 
> 'Requires pymaging with PNG support'
> test_render_pymaging_png_bad_kind (qrcode.tests.test_qrcode.QRCodeTests) ... 
> skipped 'Requires pymaging'
> test_render_svg (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_svg_fragment (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_svg_path (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_svg_with_background (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> runTest (qrcode.tests.test_qrcode.ShortcutTest) ... ok
> runTest (qrcode.tests.test_example.ExampleTest) ... ok
> pure (unittest.loader._FailedTest) ... ERROR
> 
> ==
> ERROR: pure (unittest.loader._FailedTest)
> --
> ImportError: Failed to import test module: pure
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/unittest/loader.py", line 153, in 
> loadTestsFromName
> module = __import__(module_name)
>   File "/tmp/pobj/qrcode-6.0/qrcode-6.0/qrcode/image/pure.py", line 1, in 
> 
> from pymaging import Image
> ModuleNotFoundError: No module named 'pymaging'
> 

This one fails because module is missing.  We do not have 
`pymaging` in ports so, either make the test skip (bad) or
port the python module first and include it in TEST_DEPENDS


> 
> ==
> FAIL: 

Re: NEW: textproc/qrcode

2018-05-12 Thread Stuart Henderson
On 2018/05/12 08:50, Daniel Jakots wrote:
> On Sat, 12 May 2018 11:33:11 +0200, Klemens Nanni 
> wrote:
> 
> > With COMMENT, DISTNAME and CATEGORIES column aligned, it's a tad
> > easier to read, imho.
> 
> Agreed.
> 
> 
> Also the README shows it can be used as a library [0], wouldn't it make
> more sense to name the port py-qrcode and provide both python flavours?

I definitely agree.

> 
> [0]: https://github.com/lincolnloop/python-qrcode#advanced-usage
> 



Re: NEW: textproc/qrcode

2018-05-12 Thread Daniel Jakots
On Sat, 12 May 2018 11:33:11 +0200, Klemens Nanni 
wrote:

> With COMMENT, DISTNAME and CATEGORIES column aligned, it's a tad
> easier to read, imho.

Agreed.


Also the README shows it can be used as a library [0], wouldn't it make
more sense to name the port py-qrcode and provide both python flavours?


[0]: https://github.com/lincolnloop/python-qrcode#advanced-usage



Re: NEW: textproc/qrcode

2018-05-12 Thread Klemens Nanni
On Sat, May 12, 2018 at 11:33:11AM +0200, Klemens Nanni wrote:
> On Sat, May 12, 2018 at 10:27:20AM +0200, Ingo Feinerer wrote:
> > please find attached a port for qrcode, a pure python QR Code generator:
> > https://github.com/lincolnloop/python-qrcode
> Looks good, but some tests fail, test.log attached.
... here it is.
running test
running egg_info
writing qrcode.egg-info/PKG-INFO
writing dependency_links to qrcode.egg-info/dependency_links.txt
writing entry points to qrcode.egg-info/entry_points.txt
writing requirements to qrcode.egg-info/requires.txt
writing top-level names to qrcode.egg-info/top_level.txt
reading manifest file 'qrcode.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'qrcode.egg-info/SOURCES.txt'
running build_ext
test_bad_factory (qrcode.tests.test_script.ScriptTest) ... ok
test_factory (qrcode.tests.test_script.ScriptTest) ... ok
test_isatty (qrcode.tests.test_script.ScriptTest) ... ok
test_optimize (qrcode.tests.test_script.ScriptTest) ... ok
test_piped (qrcode.tests.test_script.ScriptTest) ... ok
test_stdin (qrcode.tests.test_script.ScriptTest) ... ok
test_stdin_py3_unicodedecodeerror (qrcode.tests.test_script.ScriptTest) ... ok
test_change (qrcode.tests.test_release.UpdateManpageTests) ... 
/usr/local/lib/python3.6/re.py:212: FutureWarning: split() requires a non-empty 
pattern match.
  return _compile(pattern, flags).split(string, maxsplit)
ok
test_invalid_data (qrcode.tests.test_release.UpdateManpageTests) ... FAIL
test_no_change (qrcode.tests.test_release.UpdateManpageTests) ... FAIL
test_not_qrcode (qrcode.tests.test_release.UpdateManpageTests) ... ok
test_add_qrdata (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_basic (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_fit (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_get_matrix (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_get_matrix_border (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_invalid_version (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_large (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_mode_8bit (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_mode_8bit_newline (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_mode_alpha (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_mode_number (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_negative_size_at_construction (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_negative_size_at_usage (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_optimize (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_optimize_short (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_optimize_size (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_overflow (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_print_ascii (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_print_ascii_stdout (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_print_tty (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_print_tty_stdout (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_qrcode_bad_factory (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_qrcode_factory (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_qrdata_repr (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_regression_mode_comma (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_render_pil (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_render_pymaging_png (qrcode.tests.test_qrcode.QRCodeTests) ... skipped 
'Requires pymaging with PNG support'
test_render_pymaging_png_bad_kind (qrcode.tests.test_qrcode.QRCodeTests) ... 
skipped 'Requires pymaging'
test_render_svg (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_render_svg_fragment (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_render_svg_path (qrcode.tests.test_qrcode.QRCodeTests) ... ok
test_render_svg_with_background (qrcode.tests.test_qrcode.QRCodeTests) ... ok
runTest (qrcode.tests.test_qrcode.ShortcutTest) ... ok
runTest (qrcode.tests.test_example.ExampleTest) ... ok
pure (unittest.loader._FailedTest) ... ERROR

==
ERROR: pure (unittest.loader._FailedTest)
--
ImportError: Failed to import test module: pure
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/loader.py", line 153, in 
loadTestsFromName
module = __import__(module_name)
  File "/tmp/pobj/qrcode-6.0/qrcode-6.0/qrcode/image/pure.py", line 1, in 

from pymaging import Image
ModuleNotFoundError: No module named 'pymaging'


==
FAIL: test_invalid_data (qrcode.tests.test_release.UpdateManpageTests)
--
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/mock.py", line 1179, in patched
return func(*args, **keywargs)
  File "/tmp/pobj/qrcode-6.0/qrcode-6.0/qrcode/tests/test_release.py", line 20, 
in test_invalid_data

Re: NEW: textproc/qrcode

2018-05-12 Thread Klemens Nanni
On Sat, May 12, 2018 at 10:27:20AM +0200, Ingo Feinerer wrote:
> please find attached a port for qrcode, a pure python QR Code generator:
> https://github.com/lincolnloop/python-qrcode
Looks good, but some tests fail, test.log attached.

I'd patch setup.py, `sed -i' always seems dirty to me except for bulk
cases where you want to avoid all the patch churn for the same
substitution across lots of files.

With COMMENT, DISTNAME and CATEGORIES column aligned, it's a tad easier to
read, imho.

qr seems handy, thanks for the port.