Bug 1375962 - Review Request: python-sphinx-intl - Sphinx utility that make it easy to translate and to apply translation
Summary: Review Request: python-sphinx-intl - Sphinx utility that make it easy to tran...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-14 11:00 UTC by Julien Enselme
Modified: 2016-10-19 14:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-15 16:10:17 UTC
Type: ---
Embargoed:
zbyszek: fedora-review+


Attachments (Terms of Use)

Description Julien Enselme 2016-09-14 11:00:44 UTC
Spec URL: http://dl.jujens.eu/SPECS/python-sphinx-intl.spec
SRPM URL: http://dl.jujens.eu/SRPMS/python-sphinx-intl-0.9.9-1.gitbf6edc2.fc24.src.rpm

Description:
sphinx-intl is a utility tool that provides several features that make it easy
to translate and to apply translation to Sphinx generated document. Optional:
support the Transifex service for translation with Sphinx (not packaged yet).

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-10-05 03:54:59 UTC
Hm, fails to build in rawhide for me:
+ py.test-3.5 .
============================= test session starts ==============================
platform linux -- Python 3.5.2, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
rootdir: /builddir/build/BUILD/sphinx-intl-bf6edc2e505567768eb230099c9960ccdedd12b5, inifile: 
collected 15 items
tests/test_basic.py ......
tests/test_catalog.py ..
tests/test_cmd_pot.py FFFFFFF
=================================== FAILURES ===================================
___________________________ test_update_pot_notfound ___________________________
temp = path('/tmp/pytest-of-mockbuild/pytest-1/test_update_pot_notfound0/root')
    def test_update_pot_notfound(temp):
        r1 = runner.invoke(commands.update, ['-d', 'locale'])
        assert r1.exit_code != 0
>       assert 'Please specify pot directory with -p option,' in r1.output
E       assert 'Please specify pot directory with -p option,' in ''
E        +  where '' = <Result RuntimeError('Click will abort further execution because Python 3 was configured to use ASCII a
s encoding for ...your issue by exporting the\nfollowing environment variables:\n\n    export LC_ALL=C.UTF-8\n    export LANG=
C.UTF-8',)>.output
/builddir/build/BUILD/sphinx-intl-bf6edc2e505567768eb230099c9960ccdedd12b5/tests/test_cmd_pot.py:23: AssertionError
...

Full log at http://in.waw.pl/~zbyszek/fedora/1375962-python-sphinx-intl-build.log 

Also, PYTHONPATH=$(pwd) can be just PYTHONPATH=., the result is the same.

Looks nice, but please make the tests pass ;)

Comment 2 Zbigniew Jędrzejewski-Szmek 2016-10-05 03:56:10 UTC
Add -v to py.test invocation.

Comment 3 Zbigniew Jędrzejewski-Szmek 2016-10-05 03:59:37 UTC
IIRC, it might be enough to set the locale: LC_ALL=en_US.utf8 py.test...
See python-libarchive-c for an example.

Comment 4 Julien Enselme 2016-10-05 09:31:31 UTC
> Also, PYTHONPATH=$(pwd) can be just PYTHONPATH=., the result is the same.

Indeed, but I took the habit to use pwd to have absolute path.

Tests should pass now:
- SRPM: http://dl.jujens.eu/SRPMS/python-sphinx-intl-0.9.9-2.gitbf6edc2.fc24.src.rpm
- SPEC: http://dl.jujens.eu/SPECS/python-sphinx-intl.spec

Comment 5 Zbigniew Jędrzejewski-Szmek 2016-10-09 13:14:14 UTC
I have to say that I'm not a fan of macros that are only used one or a few times, like %cmdname, %project_owner, etc. They make c&p unnecessarily hard, and IMO decrease readability. And if you use this spec as a template for another package, search-and-replace can be used to update all the names in 3s. Anyway, just an opinion.

%{_sbindir}/update-alternatives → /sbin has been in $PATH in Fedora for years, so there's absolutely no need to specify the full path.

warning: File listed twice: /usr/bin/sphinx-intl-3
warning: File listed twice: /usr/bin/sphinx-intl-3.5
warning: File listed twice: /usr/bin/sphinx-intl-2
warning: File listed twice: /usr/bin/sphinx-intl-2.7
→ patterns are duplicated in %files

+ package name is OK
+ license is acceptable for Fedora (BSD)
+ license is specified correctly
+ latest version
+ python packaging template is used
+ %python_provide is used
+ python3 is supported
+ executables in /bin are properly versioned and symlinked
+ builds and installs OK
+ provides/requires look sane

Package is APPROVED.

Comment 6 Julien Enselme 2016-10-09 15:35:50 UTC
> I have to say that I'm not a fan of macros that are only used one or a few times, like %cmdname, %project_owner, etc. They make c&p unnecessarily hard, and IMO decrease readability. And if you use this spec as a template for another package, search-and-replace can be used to update all the names in 3s. Anyway, just an opinion.

I have no strong opinion on this. I initially wrote the spec without cmdname. I'll leave it as this for now. I may change my mind later.

> %{_sbindir}/update-alternatives → /sbin has been in $PATH in Fedora for years, so there's absolutely no need to specify the full path.

Good to know. Corrected.

> patterns are duplicated in %files

Indeed, corrected.

Thanks for the review!

Comment 7 Patrick Uiterwijk 2016-10-11 12:02:36 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-sphinx-intl

Comment 8 Fedora Update System 2016-10-12 00:55:54 UTC
python-sphinx-intl-0.9.9-3.gitbf6edc2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6d4f57b8da

Comment 9 Fedora Update System 2016-10-12 01:53:22 UTC
python-sphinx-intl-0.9.9-3.gitbf6edc2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5d9f50257c

Comment 10 Fedora Update System 2016-10-15 16:10:17 UTC
python-sphinx-intl-0.9.9-3.gitbf6edc2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-10-19 14:20:26 UTC
python-sphinx-intl-0.9.9-3.gitbf6edc2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.