CircleCI failing on setup.py, but error reproducible locally

For this project:

GitHub - swamidasslab/CROC: A package for computing ROC curves and early recognition with CROC.

I get this error when trying to build the package:

#!/bin/bash -eo pipefail
python setup.py sdist
Traceback (most recent call last):
  File "/root/project/setup.py", line 22, in <module>
    version, cmdclass = get_version_and_cmdclass("CROC")
  File "/root/project/setup.py", line 18, in get_version_and_cmdclass
    spec.loader.exec_module(module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 846, in exec_module
  File "<frozen importlib._bootstrap_external>", line 982, in get_code
  File "<frozen importlib._bootstrap_external>", line 1039, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'CROC/_version.py'

Exited with code exit status 1
CircleCI received exit code 1

I cannot reproduce this error locally. Running “python setup.py sdist” locally does not produce any errors.

What is going on? How do I fix it?

The project is freely available on github, and there should be no problem using python3.9 to build the distribution locally.

I determined the problem.

There was a case problem. It should have been looking the “croc” directory, not the “CROC” directory. Apparently, the case mismatch causes a problem in linux but not in MacOS.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.