Bug 1352972 - Review Request: python-twine - Collection of utilities for interacting with PyPI
Summary: Review Request: python-twine - Collection of utilities for interacting with PyPI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: William Moreno
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1127974 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-05 15:54 UTC by Jeremy Cline
Modified: 2016-11-20 10:02 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-20 10:02:18 UTC
Type: Bug
Embargoed:
williamjmorenor: fedora-review+


Attachments (Terms of Use)

Description Jeremy Cline 2016-07-05 15:54:50 UTC
Spec URL: https://jcline.fedorapeople.org/python-twine.spec
SRPM URL: https://jcline.fedorapeople.org/python-twine-1.6.5-1.fc25.src.rpm
Description:
Twine is a utility for interacting with PyPI.
Currently it only supports registering projects and uploading distributions.

FAS Username: jcline
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=14778045

Comment 1 Jeremy Cline 2016-07-05 15:56:11 UTC
*** Bug 1127974 has been marked as a duplicate of this bug. ***

Comment 2 Jeremy Cline 2016-07-08 15:33:47 UTC
Hi William!

I've updated the spec a little bit (based on what I learned in a different review):
Spec URL: https://jcline.fedorapeople.org/python-twine.spec
SRPM URL: https://jcline.fedorapeople.org/python-twine-1.6.5-2.fc25.src.rpm

Comment 3 Jeremy Cline 2016-07-11 14:51:56 UTC
Hi William,

Do you plan on continuing with this review? I have packages that depend on Twine and I'd like to move along with that work, so if you don't think you can get to this review in the next few days I'd like to just do a review trade with someone.

Thanks!

Comment 4 Igor Gnatenko 2016-07-11 14:56:59 UTC
> %package -n python-%{srcname}-doc
can be used by: %package doc

> mv %{buildroot}%{_bindir}/twine %{buildroot}%{_bindir}/twine-3.4
never use 3.4 or 3.5 or 2.7, use %{python2_version} or %{python3_version}

Comment 6 Jeremy Cline 2016-07-11 16:15:22 UTC
Spec URL: https://jcline.fedorapeople.org/python-twine.spec
SRPM URL: https://jcline.fedorapeople.org/python-twine-1.6.5-4.fc25.src.rpm

Updated based on comments in IRC.

Comment 7 Igor Gnatenko 2016-07-11 16:22:43 UTC
for me everything looks good except it's not latest version (1.7.4 available in upstream).

Though I didn't checked shebangs, provides, requires yet.

Comment 8 William Moreno 2016-07-11 19:33:19 UTC
I am running the review, will update results soon.

Comment 9 William Moreno 2016-07-11 21:12:00 UTC
Package Review
==============

[!]: Spec file according to URL is the same as in SRPM.

RPMlint issues:
python3-twine.noarch: E: wrong-script-interpreter /usr/lib/python3.5/site-packages/twine/__main__.py /usr/bin/env python
python3-twine.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/python2-twine.noarch: E: wrong-script-interpreter /usr/lib/python2.7/site-packages/twine/__main__.py /usr/bin/env python
python2-twine.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/twine/__main__.py 644 /usr/bin/env python

Remove python shebangs is %prep to fix this issue and package will be done.

===== 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.
[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.
[x]: 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.
[x]: Large documentation must go in a -doc subpackage.
[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.
[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]: %check is present and all tests pass.
[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]: Uses parallel make %{?_smp_mflags} macro.
[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).


Rpmlint
-------
Checking: python2-twine-1.6.5-4.fc25.noarch.rpm
          python3-twine-1.6.5-4.fc25.noarch.rpm
          python-twine-doc-1.6.5-4.fc25.noarch.rpm
          python-twine-1.6.5-4.fc25.src.rpm
python2-twine.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/twine/__main__.py 644 /usr/bin/env
python2-twine.noarch: W: no-manual-page-for-binary twine-2.7
python2-twine.noarch: W: no-manual-page-for-binary twine-2
python3-twine.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/twine/__main__.py 644 /usr/bin/env
python3-twine.noarch: W: no-manual-page-for-binary twine-3.5
python3-twine.noarch: W: no-manual-page-for-binary twine-3
4 packages and 0 specfiles checked; 2 errors, 4 warnings.


Rpmlint (installed packages)
----------------------------
python3-twine.noarch: E: wrong-script-interpreter /usr/lib/python3.5/site-packages/twine/__main__.py /usr/bin/env python
python3-twine.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/twine/__main__.py 644 /usr/bin/env python
python3-twine.noarch: W: no-manual-page-for-binary twine-3.5
python3-twine.noarch: W: no-manual-page-for-binary twine-3
python2-twine.noarch: E: wrong-script-interpreter /usr/lib/python2.7/site-packages/twine/__main__.py /usr/bin/env python
python2-twine.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/twine/__main__.py 644 /usr/bin/env python
python2-twine.noarch: W: no-manual-page-for-binary twine-2.7
python2-twine.noarch: W: no-manual-page-for-binary twine-2
3 packages and 0 specfiles checked; 4 errors, 4 warnings.



Diff spec file in url and in SRPM
---------------------------------
--- /home/wmoreno/1352972-python-twine/srpm/python-twine.spec	2016-07-11 13:48:39.573561449 -0600
+++ /home/wmoreno/1352972-python-twine/srpm-unpacked/python-twine.spec	2016-07-11 10:06:16.000000000 -0600
@@ -111,4 +111,5 @@
 %license LICENSE
 %doc README.rst AUTHORS
+%doc %{_mandir}/man1/%{srcname}.1*
 %{python3_sitelib}/*
 %{_bindir}/twine-3


Requires
--------
python3-twine (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3-pkginfo
    python3-requests
    python3-requests-toolbelt
    python3-setuptools

python2-twine (rpmlib, GLIBC filtered):
    /usr/bin/python2
    python(abi)
    python2-pkginfo
    python2-requests
    python2-requests-toolbelt
    python2-setuptools

python-twine-doc (rpmlib, GLIBC filtered):

Provides
--------
python3-twine:
    python3-twine

python2-twine:
    python-twine
    python2-twine

python-twine-doc:
    python-twine-doc

Source checksums
----------------
https://github.com/pypa/twine/archive/1.6.5/twine-1.6.5.tar.gz :
  CHECKSUM(SHA256) this package     : 09b645ed0a60a857be45fb666aecae201e51f698b64d863a2a7219b0c20bb179
  CHECKSUM(SHA256) upstream package : 09b645ed0a60a857be45fb666aecae201e51f698b64d863a2a7219b0c20bb179

Comment 10 Igor Gnatenko 2016-07-12 05:59:34 UTC
William, note that not latest version is packaged which is one of points for review.

Comment 11 Jeremy Cline 2016-07-12 15:34:17 UTC
Spec URL: https://jcline.fedorapeople.org/python-twine.spec
SRPM URL: https://jcline.fedorapeople.org/python-twine-1.6.5-5.fc25.src.rpm

This is indeed not the latest version (which was released the same day I submitted this review request). I request that that not block this review. I am aware of the new version and am in the process of packaging all the new dependencies. I'll update twine to the latest version as soon as all its new dependencies are packaged.

Comment 12 William Moreno 2016-07-12 16:50:45 UTC
Last version packaged is a SHOULD and not a MUST, looking at the commits since packaged version to last version look like there are not secutiry flags:

https://github.com/pypa/twine/compare/1.6.5...master

Any way I am currious about what package depend on twine so there is not a bloqued bug, also is there are missing depencies I can take the review of then.

Comment 13 Jeremy Cline 2016-07-12 18:36:06 UTC
I'm working on de-vendorizing clint and should hopefully have a review request today or tomorrow, depending on how much trouble that turns up.

What originally got me started on twine is Pulp, which has a Python plugin that is about to start depending on Twine[0]. Pulp is in Fedora 24+ so I want to get Twine in ahead of the release that introduces that dependency.

[0] https://github.com/pulp/pulp_python/pull/84

Comment 14 Jeremy Cline 2016-07-12 19:15:26 UTC
clint turned out to not be terribly troublesome to devendor so I've submitted a review request: https://bugzilla.redhat.com/show_bug.cgi?id=1355871.

I'd still rather not block this review for the latest version, as it's not a strict requirement and I'm actively working on it.

Comment 15 William Moreno 2016-07-14 22:24:50 UTC
I see clint is available in rawhide now, can you you update to latest release to aprove this package?

Comment 16 Jeremy Cline 2016-07-15 13:23:09 UTC
Spec URL: https://jcline.fedorapeople.org/python-twine.spec
SRPM URL: https://jcline.fedorapeople.org/python-twine-1.7.4-1.fc25.src.rpm

Thanks again for the review, William and Igor!

Comment 17 William Moreno 2016-07-18 22:47:48 UTC
Hi, please include python2-clint and python3-clint as BuildRequires for %%check:

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.Mio272
+ umask 022
+ cd /builddir/build/BUILD
+ cd twine-1.7.4
+ /usr/bin/python2 setup.py test
running test
Searching for clint
Reading https://pypi.python.org/simple/clint/
Download error on https://pypi.python.org/simple/clint/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'clint' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for clint
error: Could not find suitable distribution for Requirement.parse('clint')
error: Bad exit status from /var/tmp/rpm-tmp.Mio272 (%check)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Mio272 (%check)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.5/site-packages/mockbuild/util.py", line 551, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-twine.spec

Comment 19 William Moreno 2016-07-20 05:05:03 UTC
Looks good, package aproved

Comment 20 Gwyn Ciesla 2016-07-20 13:21:41 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-twine

Comment 21 William Moreno 2016-10-10 20:58:43 UTC
This package was imported?

Comment 22 Jeremy Cline 2016-10-10 23:35:38 UTC
(In reply to William Moreno from comment #21)
> This package was imported?

I'm not sure I understand what you mean by imported. If you're asking if this package is built, it's currently available in F23-Rawhide and EPEL7: https://apps.fedoraproject.org/packages/python-twine


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