can python-crypto and pycryptodome co-exist?

Bug #1759985 reported by Seth Arnold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pycryptodome (Ubuntu)
Invalid
Undecided
Unassigned
python-crypto (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello,

The pycryptodome docs have:

> The installation procedure depends on the package you want the library in.
> PyCryptodome can be used as:
>$
> #. **a 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.
>$

Currently there's no Breaks or Conflicts lines in either package:

$ grep -e Break -e Conflict pycryptodome/bionic/pycryptodome-3.4.7/debian/* python-crypto/bionic/python-crypto-2.6.1/debian/*
grep: pycryptodome/bionic/pycryptodome-3.4.7/debian/patches: Is a directory
grep: pycryptodome/bionic/pycryptodome-3.4.7/debian/source: Is a directory
grep: pycryptodome/bionic/pycryptodome-3.4.7/debian/tests: Is a directory
grep: pycryptodome/bionic/pycryptodome-3.4.7/debian/upstream: Is a directory
python-crypto/bionic/python-crypto-2.6.1/debian/changelog: - Remove obsolete Breaks+Replaces
python-crypto/bionic/python-crypto-2.6.1/debian/changelog: * Drop obsolete Conflicts/Replaces with python2.3-crypto and
python-crypto/bionic/python-crypto-2.6.1/debian/changelog: - Add Breaks python{,3}-keyring (<= 0.7.1-1) to python{,3}-crypto.
grep: python-crypto/bionic/python-crypto-2.6.1/debian/patches: Is a directory
grep: python-crypto/bionic/python-crypto-2.6.1/debian/source: Is a directory
grep: python-crypto/bionic/python-crypto-2.6.1/debian/tests: Is a directory

Can these two packages be installed side-by-side? Or is this something
that matters only to 'pip' installs?

Thanks

Revision history for this message
Steve Langasek (vorlon) wrote :

Despite being listed upstream as a "drop-in replacement" for python-crypto, that is not how it's packaged in Debian/Ubuntu. The cryptodome package installs a 'Cryptodome' module, not a 'Crypto' module; the two can be successfully coinstalled, and I see nothing that would prevent them from being used on the same system.

$ python3
Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Crypto
>>> import Cryptodome
>>>
$

The autopkgtests of both packages also pass fine with both modules installed.

Changed in python-crypto (Ubuntu):
status: New → Invalid
Changed in pycryptodome (Ubuntu):
status: New → Invalid
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Beautiful! Thanks Steve.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.