[
https://issues.apache.org/jira/browse/CASSANDRA-18642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106979#comment-18106979
]
Brandon Williams commented on CASSANDRA-18642:
----------------------------------------------
bq. it would seem that we need to package for each 3.x version we want to
support
The reason for that is because we install to the python sitelib, which is
version specific. If instead we install to a location like
/usr/share/cassandra/pylib, we can avoid any Python-version problems, so long
as the code supports the Python-version being used.
I have a branch for this
[here|https://github.com/driftx/cassandra/tree/CASSANDRA-18642-5.0] which also
has a small commit to bring Debian to parity, which has the added benefit of
removing some build deps that are no longer needed. I did a packaging CI run
[here|http://ci-cassandra.infra.datastax.com/job/cassandra-5.0/200/], if all of
this looks good I'll do the other branches.
> cqlsh on Cassandra 4.1.2 fails on Amazon Linux
> -----------------------------------------------
>
> Key: CASSANDRA-18642
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18642
> Project: Apache Cassandra
> Issue Type: Bug
> Components: CQL/Interpreter, Packaging
> Reporter: Stefan Miklosovic
> Assignee: Brandon Williams
> Priority: Normal
> Fix For: 4.0.x, 4.1.x, 6.x
>
> Attachments: signature.asc, signature.asc
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> I am on the newest Amazon Linux Version 2023.1.20230629
> When I install cassandra-4.1.2 from Yum repository, it starts fine but cqlsh
> prints this:
> {code}
> [ec2-user@ip-172-31-27-5 ~]$ cqlsh
> Traceback (most recent call last):
> File "/usr/bin/cqlsh.py", line 148, in <module>
> from cqlshlib import cql3handling, pylexotron, sslhandling,
> cqlshhandling, authproviderhandling
> ModuleNotFoundError: No module named 'cqlshlib'
> {code}
> If I change in /usr/bin/cqlsh.py
> {code}
> cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
> {code}
> to this
> {code}
> cqlshlibdir = os.path.join('/usr/lib/python3.6', 'site-packages')
> {code}
> it works.
> I am not sure if this is the correct way to handle that as not everybody has
> python3.6. There is also no symlink pointing to this. I guess we would need
> to find where packages are for Python we are going to use in cassandra.spec
> and then change cqlsh.py to reflect that?
> {code}
> [ec2-user@ip-172-31-27-5 /]$ sudo find -type d -name site-packages
> ./usr/lib/python3.9/site-packages
> ./usr/lib/python3.6/site-packages
> ./usr/lib64/python3.9/site-packages
> {code}
> I think we need to pass whatever this (1) expands to here (2)
> (1) https://github.com/apache/cassandra/blob/trunk/redhat/cassandra.spec#L167
> (2) https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L78
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]