Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836245 - Should dev-python/pycryptodomex::science be integrated in dev-python/pycryptodomex::gentoo ?
Summary: Should dev-python/pycryptodomex::science be integrated in dev-python/pycrypto...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-27 04:19 UTC by Horea Christian
Modified: 2022-03-30 07:38 UTC (History)
3 users (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 Horea Christian 2022-03-27 04:19:35 UTC
The two packages seem to be based largely on the same github code ( https://github.com/Legrandin/pycryptodome ), with different pypi release packages (https://pypi.org/project/pycryptodome/ and https://pypi.org/project/pycryptodomex/ , respectively).

dev-python/pycryptodomex::science seems to be the “better” one as it does not conflict with dev-python/pycrypto.

From the github README:

"""
The installation procedure depends on the package you want the library to be in. PyCryptodome can be used as:

    * an almost drop-in replacement for the old PyCrypto library. You install it with:

    pip install pycryptodome

    In this case, all modules are installed under the Crypto package.

    One must avoid having both PyCrypto and PyCryptodome installed at the same time, as they will interfere with each other.

    This option is therefore recommended only when you are sure that the whole application is deployed in a virtualenv.

    * a library independent of the old PyCrypto. You install it with:

    pip install pycryptodomex

    In this case, all modules are installed under the Cryptodome package. PyCrypto and PyCryptodome can coexist.

"""

But perhaps they should both be provided. Unsure whether they should be handled as separate packages as per the pypi tarballs, or whether the switch should be done dynamically via a USE flag based on the common github source code.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-27 04:21:23 UTC
No, use dev-python/pycryptodome and fix the imports in the packages using it. It's really easy.

The *only* difference between them is the module name: https://github.com/p0dalirius/pydsinternals/commit/05904ec91b230150c04ba10bb4556450eead5438.

pycryptodomex was in ::gentoo before and was last-rited.
Comment 2 Horea Christian 2022-03-30 07:36:19 UTC
Right, that's what the README says — on account of the different name it doesn't collide with dev-python/pycrypto.
Why prevent the option of installing them both on one system?
In a sense pycryptodomex seems to be a namespace fix.

Interestingly ::gentoo doesn't seem to actually distribute dev-python/pycrypto, even though the dev-python/pycryptodome ebuild has `!dev-python/pycrypto` in `RDEPEND` — so the advantage is currently just theoretical though it needn't remain so.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-03-30 07:38:59 UTC
For the same reason we don't include several copies of the same packages.