Bug 1389739

Summary: Use setuptools instead of distutils to package python-nss
Product: [Fedora] Fedora Reporter: Christian Heimes <cheimes>
Component: python-nssAssignee: John Dennis <jdennis>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: jdennis
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 19:02:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Patch
none
Corrected patch none

Description Christian Heimes 2016-10-28 11:49:51 UTC
Created attachment 1214974 [details]
Patch

Description of problem:
python-nss uses distutils to build and distribute itself. Although distutils is not yet deprecated, the Python packaging user guide recommends [1] setuptools in favor of distutils. Setuptools has a couple of advantages over distutils. For example it supports the wheels [2] package format.

I'm currently trying to make it easier to FreeIPA's client libraries. Wheels are one step in my undertaking. python-nss is the only package that does not support bdist_wheel yet.

[1] https://packaging.python.org/current/
[2] https://wheel.readthedocs.io/en/latest/

Version-Release number of selected component (if applicable):
1.1.0

How reproducible:
always

Steps to Reproduce:
$ sudo dnf install python-pip python2-wheel
$ pip wheel --wheel-dir=/tmp python-nss
Collecting python-nss
  Using cached python-nss-1.0.0.tar.bz2
Building wheels for collected packages: python-nss
  Running setup.py bdist_wheel for python-nss ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-k5okIR/python-nss/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpGY8cYwpip-wheel-:
  compiling with debug
  invalid command name '/tmp/tmpGY8cYwpip-wheel-'
  
  ----------------------------------------
  Failed building wheel for python-nss
  Running setup.py clean for python-nss
Failed to build python-nss
ERROR: Failed to build one or more wheels

Comment 1 Christian Heimes 2016-10-28 12:03:23 UTC
Created attachment 1214976 [details]
Corrected patch

My first patch did not fix the bdist_wheel issue. There was a conflict between your custom setup arguments and distutils. setup.py was using '-d' as an alias for '--debug'. The '-d' argument is also a reserved alias for '--dist-dir'. I had to remove the alias for '--debug'.

$ python setup.py bdist --help
...
Options for 'bdist' command:
  --bdist-base (-b)  temporary directory for creating built distributions
  --plat-name (-p)   platform name to embed in generated filenames (default:
                     linux-x86_64)
  --formats          formats for distribution (comma-separated list)
  --dist-dir (-d)    directory to put final built distributions in [default:
                     dist]
...

Comment 3 Christian Heimes 2016-10-28 12:05:22 UTC
Created attachment 1214977 [details]
Corrected patch

Comment 8 Fedora End Of Life 2017-07-25 23:39:02 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2017-08-08 19:02:01 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.