Skip to content

[Ecosystem] Downgrade wheel constraint #10827

@dotyjim-work

Description

@dotyjim-work

Jira Link: DB-761

Description

In a restricted customer environment that didn't have access to Pypi, we were are able to satisfy all but the wheel constraint in the yugabyte/cassandra-python-driver/setup.py#L406 1. Our driver currently requires wheel>=0.34.2 but out of the box CentOS7/RHEL7 repos have python3-wheel-0.31.1-5.el7_7.noarch available.

A first pass at the issue seems like we can loosen the constraint. So given a fresh Centos7 (equivalent to RHEL 7 for this investigation), and the yb-cassandra-driver-3.13.0.2,

> podman run -it -v `pwd`:/case centos:7.7.1908 /bin/bash
[root@9effa33a5216 /]# cd case/
[root@9effa33a5216 case]# ll
total 236
drwxr-xr-x 4  501 games   4096 Dec  9 22:41 yb-cassandra-driver-3.13.0.2
-rw-r--r-- 1 root root  227252 Dec  8 23:56 yb-cassandra-driver-3.13.0.2.tar.gz

Simulate not being able to use the Pypi package index:

# pip3 install . --no-index
...
Processing /case/yb-cassandra-driver-3.13.0.2
Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.6/site-packages (from yb-cassandra-driver==3.13.0.2)
Collecting wheel>=0.34.2 (from yb-cassandra-driver==3.13.0.2)
  Could not find a version that satisfies the requirement wheel>=0.34.2 (from yb-cassandra-driver==3.13.0.2) (from versions: )
No matching distribution found for wheel>=0.34.2 (from yb-cassandra-driver==3.13.0.2)

change wheel >= '0.31.1',

# vim setup.py +406 

and then resolve the dependency 2

# yum intstall -d1 -y python3-wheel
# rpm -qa | grep wheel
python3-wheel-0.31.1-5.el7_7.noarch

and then try the install again

# pip3 install . --no-index                                                                                                                                                                                                         
...
Processing /case/yb-cassandra-driver-3.13.0.2
Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.6/site-packages (from yb-cassandra-driver==3.13.0.2)
Requirement already satisfied: wheel>=0.31.1 in /usr/lib/python3.6/site-packages (from yb-cassandra-driver==3.13.0.2)
Building wheels for collected packages: yb-cassandra-driver
  Running setup.py bdist_wheel for yb-cassandra-driver ... done
  Stored in directory: /root/.cache/pip/wheels/b5/2f/9c/a6c00b2c0a2453d7828d1754a8fdfec2f98c11ce72d4dd957c
Successfully built yb-cassandra-driver
Installing collected packages: yb-cassandra-driver
Successfully installed yb-cassandra-driver-3.13.0.2

and as a smoke test, does the example program from the docs work?

# python3 ./yb-cql-helloworld.py 
Created keyspace ybdemo
Created table employee
Inserted (id, name, age, language) = (1, 'John', 35, 'Python')
John 35 Python

Yes.


Footnotes

  1. Introduced in https://github.com/yugabyte/cassandra-python-driver/pull/1 && https://github.com/yugabyte/cassandra-python-driver/commit/4a8d18b568780531a06efb6d5acbe65fd2ae2afc

  2. Just for this test we are not setting up a python venv

Metadata

Metadata

Assignees

Labels

area/ecosystemLabel for all ecosystem related projectskind/new-featureThis is a request for a completely new featurepriority/mediumMedium priority issue

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions