Bug 1631987 (python-deepdiff) - Review Request: python-deepdiff - Deep Difference and search of any Python object/data
Summary: Review Request: python-deepdiff - Deep Difference and search of any Python ob...
Keywords:
Status: CLOSED ERRATA
Alias: python-deepdiff
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-22 21:59 UTC by Susi Lehtola
Modified: 2018-11-21 16:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-21 03:10:59 UTC
Type: ---
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Susi Lehtola 2018-09-22 21:59:44 UTC
Spec URL: https://jussilehtola.fedorapeople.org/python-deepdiff.spec
SRPM URL: https://jussilehtola.fedorapeople.org/python-deepdiff-3.3.0-1.fc28.src.rpm
Fedora Account System Username: jussilehtola

Description:
Deep Difference of dictionaries, iterables, strings and other
objects. It will recursively look for all the changes.

This package is required for updating psi4 to the 1.2 series.

Comment 1 Robert-André Mauchin 🐧 2018-09-24 13:19:25 UTC
 - Don't split the source into python2 / python3, just use

%prep
%autosetup

 - %{__python2} setup.py build → %py2_build

 - %{__python2} setup.py install -O1 --skip-build --root %{buildroot} → py2_install

 - Add BR for mock, jsonpickle, numpy

 - Add Version-Release info in your %changelog entry

 - Don't forget to build the docs:

make -C docs html
# remove the sphinx-build leftovers
rm -rf docs/_build/html/.{doctrees,buildinfo}

 - Remove the shebangs:

python3-deepdiff.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/deepdiff/contenthash.py /usr/bin/env python
python3-deepdiff.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/deepdiff/contenthash.py 644 /usr/bin/env python
python3-deepdiff.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/deepdiff/diff.py /usr/bin/env python
python3-deepdiff.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/deepdiff/diff.py 644 /usr/bin/env python
python3-deepdiff.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/deepdiff/search.py /usr/bin/env python
python3-deepdiff.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/deepdiff/search.py 644 /usr/bin/env python


 - You should use pyp2rpm, it's way faster:

==============================================================================
# Created by pyp2rpm-3.3.2
%global pypi_name deepdiff

%if 0%{?fedora}
%bcond_without python3
%else
%bcond_with python3
%endif

%if 0%{?fedora} >= 30
%bcond_with python2
%else
%bcond_without python2
%endif

Name:           python-%{pypi_name}
Version:        3.3.0
Release:        1%{?dist}
Summary:        Deep Difference and Search of any Python object/data

License:        MIT
URL:            https://github.com/seperman/deepdiff
Source0:        https://github.com/seperman/deepdiff/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch:      noarch
 
%if %{with python2}
BuildRequires:  python2-devel
BuildRequires:  python2dist(jsonpickle)
BuildRequires:  python2dist(numpy)
BuildRequires:  python2dist(mock)
BuildRequires:  python2dist(setuptools)
BuildRequires:  python2dist(sphinx)
%endif
 
%if %{with python3}
BuildRequires:  python3-devel
BuildRequires:  python3dist(jsonpickle)
BuildRequires:  python3dist(numpy)
BuildRequires:  python3dist(mock)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(sphinx)
%endif

%description
Deep Difference of dictionaries, iterables, strings and
other objects. It will recursively look for all the changes.

%if %{with python2}
%package -n     python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
 
Requires:       python2dist(jsonpickle)
%description -n python2-%{pypi_name}
Deep Difference of dictionaries, iterables, strings and
other objects. It will recursively look for all the changes.
%endif

%if %{with python3}
%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
 
Requires:       python3dist(jsonpickle)
%description -n python3-%{pypi_name}
Deep Difference of dictionaries, iterables, strings and
other objects. It will recursively look for all the changes.
%endif

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

for lib in deepdiff/*.py; do
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
 touch -r $lib $lib.new &&
 mv $lib.new $lib
done

%build
%if %{with python2}
%py2_build
%endif
%if %{with python3}
%py3_build
%endif

make -C docs html
# remove the sphinx-build leftovers
rm -rf docs/_build/html/.{doctrees,buildinfo}


%install
# Must do the default python version install last because
# the scripts in /usr/bin are overwritten with every setup.py install.
%if %{with python2}
%py2_install
%endif
%if %{with python3}
%py3_install
%endif

%check
%if %{with python2}
%{__python2} setup.py test
%endif
%if %{with python3}
%{__python3} setup.py test
%endif

%if %{with python2}
%files -n python2-%{pypi_name}
%license LICENSE
%doc AUTHORS README.md README.txt docs/_build/html
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif

%if %{with python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc AUTHORS README.md README.txt docs/_build/html
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif

%changelog
* Sat Sep 22 2018 Susi Lehtola <susi.lehtola> - 3.3.0-1
- First release.
==============================================================================





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: "MIT/X11 (BSD like)", "Unknown or generated". 29 files have
     unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-deepdiff/review-python-
     deepdiff/licensecheck.txt
[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 747520 bytes in 37 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 does not own files or directories owned by other packages.
[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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

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

Generic:
[x]: Uses parallel make %{?_smp_mflags} macro.
[-]: 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: python3-deepdiff-3.3.0-1.fc30.noarch.rpm
          python-deepdiff-3.3.0-1.fc30.src.rpm
python3-deepdiff.noarch: W: spelling-error %description -l en_US iterables -> iterates, terabits, terabit
python3-deepdiff.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/deepdiff/contenthash.py /usr/bin/env python
python3-deepdiff.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/deepdiff/contenthash.py 644 /usr/bin/env python
python3-deepdiff.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/deepdiff/diff.py /usr/bin/env python
python3-deepdiff.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/deepdiff/diff.py 644 /usr/bin/env python
python3-deepdiff.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/deepdiff/search.py /usr/bin/env python
python3-deepdiff.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/deepdiff/search.py 644 /usr/bin/env python
python-deepdiff.src: W: spelling-error %description -l en_US iterables -> iterates, terabits, terabit
2 packages and 0 specfiles checked; 6 errors, 2 warnings.

Comment 2 Robert-André Mauchin 🐧 2018-09-24 13:22:04 UTC
Mind doing a quick review in exchange? A C++ library: https://bugzilla.redhat.com/show_bug.cgi?id=1632243
If you have the time, if not, no worry.

Comment 3 Susi Lehtola 2018-09-24 14:43:55 UTC
Thanks for the review! I haven't done a lot of Python packaging in a while, so I wasn't aware of pyp2rpm. I just used the Python template from rpmdev-newspec. All issues should be fixed

https://jussilehtola.fedorapeople.org/python-deepdiff.spec
https://jussilehtola.fedorapeople.org/python-deepdiff-3.3.0-2.fc28.src.rpm

Comment 4 Robert-André Mauchin 🐧 2018-09-24 15:16:59 UTC
You're missing BuildRequires:  python2dist(sphinx) / BuildRequires:  python3dist(sphinx) to build the docs.

Comment 5 Robert-André Mauchin 🐧 2018-09-24 15:18:06 UTC
Also you need BuildRequires:  python2dist(numpy) / BuildRequires:  python3dist(numpy) to run the tests.

Comment 6 Susi Lehtola 2018-09-24 16:14:29 UTC
Sorry, I'm doing a billion things at once. Missing build deps added.


https://jussilehtola.fedorapeople.org/python-deepdiff.spec
https://jussilehtola.fedorapeople.org/python-deepdiff-3.3.0-3.fc28.src.rpm

Comment 7 Robert-André Mauchin 🐧 2018-09-24 16:36:10 UTC
Ok, package approved.

Comment 8 Gwyn Ciesla 2018-09-24 20:22:47 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-deepdiff

Comment 9 Fedora Update System 2018-11-11 18:41:27 UTC
python-deepdiff-3.3.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1ecea94ef5

Comment 10 Fedora Update System 2018-11-11 18:41:32 UTC
python-deepdiff-3.3.0-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a892d5f0c8

Comment 11 Fedora Update System 2018-11-11 20:00:01 UTC
python-deepdiff-3.3.0-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a892d5f0c8

Comment 12 Fedora Update System 2018-11-11 20:00:22 UTC
python-deepdiff-3.3.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1ecea94ef5

Comment 13 Fedora Update System 2018-11-12 02:45:35 UTC
python-deepdiff-3.3.0-3.fc29 has been pushed to the Fedora 29 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-2018-a892d5f0c8

Comment 14 Fedora Update System 2018-11-12 02:51:31 UTC
python-deepdiff-3.3.0-3.fc28 has been pushed to the Fedora 28 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-2018-1ecea94ef5

Comment 15 Fedora Update System 2018-11-21 03:10:59 UTC
python-deepdiff-3.3.0-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2018-11-21 16:52:11 UTC
python-deepdiff-3.3.0-3.fc29 has been pushed to the Fedora 29 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.