Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703252 - dev-python/pyzmq: draft API support should be optional
Summary: dev-python/pyzmq: draft API support should be optional
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-18 02:55 UTC by Michael Orlitzky
Modified: 2020-03-31 01:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2019-12-18 02:55:19 UTC
Now that pymzq-17.1.0 is stable, it's forcing me to enable USE=drafts for zeromq itself, which does...

   net-libs/zeromq: Build draft API, which may change at any time 
    without any notice, and is therefore not recommended for normal use.

Naturally this prompts some investigation. It looks like the previous version 16.0.2 of pymzq tried to build against zeromq[drafts] as well, but did so implicitly:

  RDEPEND="                                                                       
    >=net-libs/zeromq-4.1.2:=
  ...
  python_configure_all() {
    tc-export CC
    append-cppflags -DZMQ_BUILD_DRAFT_API=1
  }

In the new version 17.1.0, somebody caught the mistake and added the USE dependency,

  RDEPEND="                                                                       
    >=net-libs/zeromq-4.2.2-r2:=[drafts]
  ...
  python_configure_all() {
    tc-export CC
    append-cppflags -DZMQ_BUILD_DRAFT_API=1
  }

However, there's (now?) a better way to enable the draft API. First, it should be controlled by a USE flag in pymzq. But then the setup.py file supports a "--enable-drafts" flag:

  if arg == '--enable-drafts':
      sys.argv.remove(arg)
      os.environ['ZMQ_DRAFT_API'] = '1'

So we can drop that append-cppflags stuff, and have pymzq[drafts] depend on zeromq[drafts], and then --enable-drafts conditionally. This should let people who don't need the draft API avoid it in both packages.
Comment 1 Larry the Git Cow gentoo-dev 2020-03-31 01:01:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dcf4215b1fe204760ac16c934c11a637e88424e

commit 5dcf4215b1fe204760ac16c934c11a637e88424e
Author:     Patrick McLean <patrick.mclean@sony.com>
AuthorDate: 2020-03-31 01:01:08 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2020-03-31 01:01:19 +0000

    dev-python/pyzmq-19.0.0: bump, py38, add draft USE flag (bug #703252)
    
    Closes: https://bugs.gentoo.org/703252
    Copyright: Sony Interactive Entertainment Inc.
    Package-Manager: Portage-2.3.96, Repoman-2.3.22
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 dev-python/pyzmq/Manifest                       |   1 +
 dev-python/pyzmq/files/pyzmq-19.0.0-tests.patch | 186 ++++++++++++++++++++++++
 dev-python/pyzmq/metadata.xml                   |   3 +
 dev-python/pyzmq/pyzmq-19.0.0.ebuild            |  61 ++++++++
 4 files changed, 251 insertions(+)