Bug 1262965

Summary: Review Request: python-setuptoos_scm - The blessed package to manage your versions by scm tags
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: Package ReviewAssignee: Richard Shaw <hobbes1069>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: hobbes1069, ilya.gradina, package-review, pingou
Target Milestone: ---Flags: hobbes1069: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-setuptools_scm-1.8.0-2.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-21 15:36:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2015-09-14 18:58:21 UTC
Spec URL: http://www.cora.nwra.com/~orion/fedora/python-setuptools_scm.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/python-setuptools_scm-1.7.0-1.fc24.src.rpm
Description:
Setuptools_scm handles managing your python package versions in scm metadata.
It also handles file finders for the suppertes scms.

Fedora Account System Username: orion

Comment 1 Ilia Gradina 2015-09-19 11:37:42 UTC
This is an unofficial review of the package.
some notes:
1) not latest version is packaged. ( 1.8.0 )
2) license - MIT ( https://pypi.python.org/pypi/setuptools_scm )

----------------------------------------------------------------------------

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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated". 13 files have unknown license. Detailed
     output of licensecheck in /home/ilgrad/1262965-python-
     setuptools_scm/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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.
[ ]: 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 40960 bytes in 4 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 does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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:
[ ]: Python eggs must not download any dependencies during the build
     process.
[ ]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: 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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-setuptools_scm , python3-setuptools_scm
[ ]: Package functions as described.
[-]: Latest version is packaged.
[ ]: 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.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).

Rpmlint (installed packages)
----------------------------
python2-setuptools_scm.noarch: W: invalid-license Check
python3-setuptools_scm.noarch: W: invalid-license Check
2 packages and 0 specfiles checked; 0 errors, 2 warnings.



Diff spec file in url and in SRPM
---------------------------------
--- /home/ilgrad/1262965-python-setuptools_scm/srpm/python-setuptools_scm.spec	2015-09-19 13:59:22.689165165 +0300
+++ /home/ilgrad/1262965-python-setuptools_scm/srpm-unpacked/python-setuptools_scm.spec	2015-09-14 21:50:27.000000000 +0300
@@ -1,6 +1,2 @@
-%if 0%{?fedora}
-%global with_python3 1
-%endif
-
 %global srcname setuptools_scm
 %global sum The blessed package to manage your versions by scm tags
@@ -11,11 +7,12 @@
 Summary:	%{sum}
 
-License:	MIT
+License:	Check
 URL:            http://pypi.python.org/pypi/%{srcname}
 Source0:        http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
 
 BuildArch:      noarch
-BuildRequires:  python2-devel
+BuildRequires:  python2-devel python3-devel
 BuildRequires:  pytest
+BuildRequires:  python3-pytest
 # For tests
 BuildRequires:  git-core
@@ -35,9 +32,6 @@
 
 
-%if 0%{?with_python3}
 %package -n python3-%{srcname}
 Summary:        %{sum}
-BuildRequires:  python3-devel
-BuildRequires:  python3-pytest
 %{?python_provide:%python_provide python3-%{srcname}}
 
@@ -45,5 +39,4 @@
 Setuptools_scm handles managing your python package versions in scm metadata.
 It also handles file finders for the suppertes scms.
-%endif
 
 
@@ -53,7 +46,5 @@
 %build
 %py2_build
-%if 0%{?with_python3}
 %py3_build
-%endif
 
 %install
@@ -62,13 +53,9 @@
 # python3 version to be the default.
 %py2_install
-%if 0%{?with_python3}
 %py3_install
-%endif
 
 %check
 PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv
-%if 0%{?with_python3}
 PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv
-%endif
 
 %files -n python2-%{srcname}
@@ -77,10 +64,8 @@
 %{python2_sitelib}/*
 
-%if 0%{?with_python3}
 %files -n python3-%{srcname}
 %license LICENSE
 %doc CHANGELOG.rst README.rst
 %{python3_sitelib}/*
-%endif
 
 %changelog


Requires
--------
python2-setuptools_scm (rpmlib, GLIBC filtered):
    python(abi)

python3-setuptools_scm (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python2-setuptools_scm:
    python-setuptools_scm
    python2-setuptools_scm

python3-setuptools_scm:
    python3-setuptools_scm

Comment 2 Orion Poplawski 2015-09-19 19:28:44 UTC
Thanks.

* Sat Sep 19 2015 Orion Poplawski <orion.com> - 1.8.0-1
- Update to 1.8.0
- Fix license tag

Spec URL: http://www.cora.nwra.com/~orion/fedora/python-setuptools_scm.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/python-setuptools_scm-1.8.0-1.fc22.src.rpm

Comment 3 Ilia Gradina 2015-09-20 22:27:18 UTC
some notes:
1)
............
python-setuptools_scm.src:10: W: mixed-use-of-spaces-and-tabs (spaces: line 10, tab: line 4)
...........,
2) 
..........
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/utils.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/version.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/__init__.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/integration.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/discover.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/hacks.pyc expected 3310 (3.4), found 62211 (2.7)
.............
--> this warning is a bug in rpmlint

Comment 4 Orion Poplawski 2015-09-21 00:01:36 UTC
Fixed tabs.

Comment 5 Richard Shaw 2015-10-19 15:05:05 UTC
Ok, like the other comment I found the magic value issue...

Rpmlint (installed packages)
----------------------------
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/utils.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/hacks.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/integration.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/__init__.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/discover.pyc expected 3310 (3.4), found 62211 (2.7)
python3-setuptools_scm.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools_scm/version.pyc expected 3310 (3.4), found 62211 (2.7)
2 packages and 0 specfiles checked; 6 errors, 0 warnings.
--- end ---

I looked through the build log and can't find where this is going wrong. It looks like the python2 package is being compiled with python 2.7 and the python3 package is being byte-compiled with python 3.4...



Requires
--------
python2-setuptools_scm (rpmlib, GLIBC filtered):
    python(abi)

python3-setuptools_scm (rpmlib, GLIBC filtered):
    python(abi)

Should the requires have version numbers? 2.7 and 3.4 respectively?

Comment 6 Orion Poplawski 2015-10-20 04:06:20 UTC
Spec URL: http://www.cora.nwra.com/~orion/fedora/python-setuptools_scm.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/python-setuptools_scm-1.8.0-2.fc22.src.rpm

* Mon Oct 19 2015 Orion Poplawski <orion.com> - 1.8.0-2
- Cleanup stray .pyc files from tests

Comment 7 Richard Shaw 2015-10-20 13:05:42 UTC
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: "Unknown or generated". 14 files have unknown license. Detailed
     output of licensecheck in /home/build/fedora-review/1262965-python-
     setuptools_scm/licensecheck.txt
[-]: License file installed when any subpackage combination is installed.
[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 40960 bytes in 4 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 does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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:
[x]: 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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-setuptools_scm , python3-setuptools_scm
[?]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: 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: python2-setuptools_scm-1.8.0-1.fc24.noarch.rpm
          python3-setuptools_scm-1.8.0-1.fc24.noarch.rpm
          python-setuptools_scm-1.8.0-1.fc24.src.rpm
python2-setuptools_scm.noarch: W: spelling-error Summary(en_US) scm -> cm, scam, scum
python2-setuptools_scm.noarch: W: spelling-error %description -l en_US Setuptools -> Setup tools, Setup-tools, Footstools
python2-setuptools_scm.noarch: W: spelling-error %description -l en_US scm -> cm, scam, scum
python2-setuptools_scm.noarch: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal
python2-setuptools_scm.noarch: W: spelling-error %description -l en_US suppertes -> suppertime, supporter, superstates
python2-setuptools_scm.noarch: W: spelling-error %description -l en_US scms -> scams, scums, sums
python3-setuptools_scm.noarch: W: spelling-error Summary(en_US) scm -> cm, scam, scum
python3-setuptools_scm.noarch: W: spelling-error %description -l en_US Setuptools -> Setup tools, Setup-tools, Footstools
python3-setuptools_scm.noarch: W: spelling-error %description -l en_US scm -> cm, scam, scum
python3-setuptools_scm.noarch: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal
python3-setuptools_scm.noarch: W: spelling-error %description -l en_US suppertes -> suppertime, supporter, superstates
python3-setuptools_scm.noarch: W: spelling-error %description -l en_US scms -> scams, scums, sums
python-setuptools_scm.src: W: spelling-error Summary(en_US) scm -> cm, scam, scum
python-setuptools_scm.src: W: spelling-error %description -l en_US Setuptools -> Setup tools, Setup-tools, Footstools
python-setuptools_scm.src: W: spelling-error %description -l en_US scm -> cm, scam, scum
python-setuptools_scm.src: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal
python-setuptools_scm.src: W: spelling-error %description -l en_US suppertes -> suppertime, supporter, superstates
python-setuptools_scm.src: W: spelling-error %description -l en_US scms -> scams, scums, sums
3 packages and 0 specfiles checked; 6 errors, 18 warnings.




Requires
--------
python2-setuptools_scm (rpmlib, GLIBC filtered):
    python(abi) = 2.7

python3-setuptools_scm (rpmlib, GLIBC filtered):
    python(abi) = 3.4



Provides
--------
python2-setuptools_scm:
    python-setuptools_scm
    python-setuptools_scm(x86-64)
    python2-setuptools_scm

python3-setuptools_scm:
    python3-setuptools_scm



Source checksums
----------------
http://pypi.python.org/packages/source/s/setuptools_scm/setuptools_scm-1.8.0.tar.bz2 :
  CHECKSUM(SHA256) this package     : ddbf365e60e5f8e3f86fe117edeee4a7e1dd8ce7a9337951c9c163e7c506e602
  CHECKSUM(SHA256) upstream package : ddbf365e60e5f8e3f86fe117edeee4a7e1dd8ce7a9337951c9c163e7c506e602


Generated by fedora-review 0.5.3 (bcf15e3) last change: 2015-05-04
Command line :/bin/fedora-review -b 1262965 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

*** APPROVED ***

Comment 8 Orion Poplawski 2015-10-21 15:36:30 UTC
Checked in and built.  Thanks again.

Comment 9 Pierre-YvesChibon 2016-01-04 15:51:54 UTC
Could you try building it for epel7 since there is branch ready?

Thanks!

Comment 10 Orion Poplawski 2016-01-04 16:45:49 UTC
We're missing a bunch of python macros in EPEL7.  I'm going see if we can remedy that quickly first...

Comment 11 Orion Poplawski 2016-01-04 17:33:35 UTC
Actually, we're pretty close - but I'm seeing some test failures: https://github.com/pypa/setuptools_scm/issues/73