[Bug 1328248] Review Request: python-pysword - Python bindings to read Sword bible files directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1328248

Robert-André Mauchin <zebob.m@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|nobody@xxxxxxxxxxxxxxxxx    |zebob.m@xxxxxxxxx
              Flags|                            |fedora-review?



--- Comment #19 from Robert-André Mauchin <zebob.m@xxxxxxxxx> ---
You don't need \ at the end of the line if you use %{expand:

 - Build error:

+ cd pysword-0.2.4
BUILDSTDERR: /var/tmp/rpm-tmp.if9CI4: line 40: cd: pysword-0.2.4: No such file
or directory

   Seems the directory is suffixed by the commit hash:

%prep
%autosetup -n %{srcname}-%{version}-%{commit}


 - Date is incorrect in %changelog:

* Sun Mar 17 2018 

   Should be: Sat Mar 17

 - Tests fail

BUILDSTDERR:
======================================================================
BUILDSTDERR: ERROR: test_load_bsv_zip (tests.test_files.TestModules)
BUILDSTDERR:
----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/test_files.py",
line 78, in test_load_bsv_zip
BUILDSTDERR:     found_modules = modules.parse_modules()
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/pysword/modules.py",
line 83, in parse_modules
BUILDSTDERR:     zipped_module = zipfile.ZipFile(self._sword_path)
BUILDSTDERR:   File "/usr/lib64/python3.6/zipfile.py", line 1090, in __init__
BUILDSTDERR:     self.fp = io.open(file, filemode)
BUILDSTDERR: FileNotFoundError: [Errno 2] No such file or directory:
'/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/resources/bsv.zip'
BUILDSTDERR:
======================================================================
BUILDSTDERR: ERROR: test_load_chipinyin_zip (tests.test_files.TestModules)
BUILDSTDERR:
----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/test_files.py",
line 60, in test_load_chipinyin_zip
BUILDSTDERR:     found_modules = modules.parse_modules()
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/pysword/modules.py",
line 83, in parse_modules
BUILDSTDERR:     zipped_module = zipfile.ZipFile(self._sword_path)
BUILDSTDERR:   File "/usr/lib64/python3.6/zipfile.py", line 1090, in __init__
BUILDSTDERR:     self.fp = io.open(file, filemode)
BUILDSTDERR: FileNotFoundError: [Errno 2] No such file or directory:
'/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/resources/chipinyin.zip'
BUILDSTDERR:
======================================================================
BUILDSTDERR: ERROR: test_load_finpr_zip (tests.test_files.TestModules)
BUILDSTDERR:
----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/test_files.py",
line 42, in test_load_finpr_zip
BUILDSTDERR:     found_modules = modules.parse_modules()
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/pysword/modules.py",
line 83, in parse_modules
BUILDSTDERR:     zipped_module = zipfile.ZipFile(self._sword_path)
BUILDSTDERR:   File "/usr/lib64/python3.6/zipfile.py", line 1090, in __init__
BUILDSTDERR:     self.fp = io.open(file, filemode)
BUILDSTDERR: FileNotFoundError: [Errno 2] No such file or directory:
'/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/resources/FinPR.zip'
BUILDSTDERR:
======================================================================
BUILDSTDERR: ERROR: test_parse_modules_folder
(tests.test_swordModules.TestSwordModules)
BUILDSTDERR:
----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/test_swordModules.py",
line 41, in test_parse_modules_folder
BUILDSTDERR:     mods_metadata = modules.parse_modules()
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/pysword/modules.py",
line 89, in parse_modules
BUILDSTDERR:     for f in os.listdir(conf_folder):
BUILDSTDERR: FileNotFoundError: [Errno 2] No such file or directory:
'/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/resources/mods.d'
BUILDSTDERR:
======================================================================
BUILDSTDERR: ERROR: test_parse_modules_zip
(tests.test_swordModules.TestSwordModules)
BUILDSTDERR:
----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/test_swordModules.py",
line 60, in test_parse_modules_zip
BUILDSTDERR:     mods_metadata = modules.parse_modules()
BUILDSTDERR:   File
"/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/pysword/modules.py",
line 83, in parse_modules
BUILDSTDERR:     zipped_module = zipfile.ZipFile(self._sword_path)
BUILDSTDERR:   File "/usr/lib64/python3.6/zipfile.py", line 1090, in __init__
BUILDSTDERR:     self.fp = io.open(file, filemode)
BUILDSTDERR: FileNotFoundError: [Errno 2] No such file or directory:
'/builddir/build/BUILD/pysword-0.2.4-46d3425a888c0667e726f6e0c7e2031daef81251/tests/resources/FinPR.zip'
BUILDSTDERR:
----------------------------------------------------------------------
BUILDSTDERR: Ran 33 tests in 0.034s
BUILDSTDERR: FAILED (errors=5, skipped=2)

   It seems test data is missing from the archive. From the website main page
it says:

Run tests
To run the testsuite, first run the script that download the files used
for testing, and then use nosetests to run the testsuite:

$ python3 tests/resources/download_bibles.py
$ nosetests -v tests/

The tests should run and pass using both python 2 and 3.

   Since Internet is not available from Koji/Mock, you need to download them
beforehand:

python3 tests/resources/download_bibles.py

   tar the whole:

tar --exclude='tests/resources/download_bibles.py' -zcvf testdata-0.2.4.tar.gz
tests/resources/

   and add the tarball as a Source:

Source1: testdata-0.2.4.tar.gz

   Then you extract it in %prep:

%prep
%autosetup -n %{srcname}-%{version}-%{commit}
%autosetup -N -T -D -a 1 -n %{srcname}-%{version}-%{commit}

(explanation for the switches here:
http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html)

   Voilà, tests can now run.



Pre-review:
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "GPL (v2)", "Unknown or generated", "*No copyright* GPL". 28
     files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-pysword/review-python-
     pysword/licensecheck.txt
[x]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/lib/python3.6/site-
     packages(python3-libs)
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python-pysword-0.2.4-1.fc29.noarch.rpm
          python-pysword-0.2.4-1.fc29.src.rpm
python-pysword.noarch: W: spelling-error %description -l en_US ztext -> text, z
text
python-pysword.noarch: W: spelling-error %description -l en_US rawtext -> raw
text, raw-text, extra
python-pysword.src: W: spelling-error %description -l en_US ztext -> text, z
text
python-pysword.src: W: spelling-error %description -l en_US rawtext -> raw
text, raw-text, extra
python-pysword.src: E: specfile-error warning: bogus date in %changelog: Sun
Mar 17 2018 Tim Bentley <Tim.Bentley@xxxxxxxxxx> - 0.2.4-1
2 packages and 0 specfiles checked; 1 errors, 4 warnings.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux