equinor / segyio

Fast Python library for SEGY files.
Other
469 stars 213 forks source link

Problem while compiling and installing from source: `setuptools.command.test` has no attribute `test` #575

Open ahadji05 opened 1 week ago

ahadji05 commented 1 week ago

I was facing a problem while trying to compile and install from source following the instruction below:

git clone https://github.com/equinor/segyio
mkdir segyio/build
cd segyio/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
make
make install

After make I would received an error: AttributeError: module 'setuptools.command' has no attribute 'test'

from file: /segyio/python/setup.py line 98: cmdclass = { 'test': setuptools.command.test.test },

ahadji05 commented 1 week ago

I solved the problem by adding: from setuptools.command.test import * at the beginning of file: /segyio/python/setup.py,

and then, changed line cmdclass = { 'test': setuptools.command.test.test }, to cmdclass = { 'test': test },

*I have a Ubuntu 22.04 system, with Python 3.11.7, make 4.3 and cmake 3.22.1.