haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
378 stars 113 forks source link

Execution of setup.py fails after any execution of "python setup.py test" with python2.7 #31

Closed mtrellet closed 5 years ago

mtrellet commented 5 years ago

Describe the bug With python2.7, when using python setup.py test to run the unit tests, *.pyc files are created in the pdbtools/ directory. Any new execution of python setup.py option fails with the following error:

→ python setup.py test
error in pdb-tools setup command: ('Invalid module name', 'pdbtools.pdb_keepcoord.')

This only happens with python2.7 because python3.2+ is now storing those compiled files into a __pycache__ directory.

To Reproduce Steps to reproduce the behavior. Preferrably, a code snippet.

→ python setup.py test
running test
running egg_info
writing pdb_tools.egg-info/PKG-INFO
writing top-level names to pdb_tools.egg-info/top_level.txt
writing dependency_links to pdb_tools.egg-info/dependency_links.txt
writing entry points to pdb_tools.egg-info/entry_points.txt
reading manifest file 'pdb_tools.egg-info/SOURCES.txt'
writing manifest file 'pdb_tools.egg-info/SOURCES.txt'
running build_ext
test_file_not_found (test_pdb_tocif.TestTool)
$ pdb_tocif not_existing.pdb ... ok
test_helptext (test_pdb_tocif.TestTool)
$ pdb_tocif ... ok
...
→ python setup.py test
error in pdb-tools setup command: ('Invalid module name', 'pdbtools.pdb_keepcoord.')

Expected behavior Any new call to setup.py should be successful and build, install or test again successfully.

Desktop (please complete the following information):

JoaoRodrigues commented 5 years ago

Fixed through #33