tox test is failed due to CHANGELOG file

Created on 20 Oct 2017  路  8Comments  路  Source: tox-dev/tox

TOXENV=py27 /usr/bin/python setup.py test is failed.

running test
running egg_info
writing requirements to tox.egg-info/requires.txt
writing tox.egg-info/PKG-INFO
writing top-level names to tox.egg-info/top_level.txt
writing dependency_links to tox.egg-info/dependency_links.txt
writing entry points to tox.egg-info/entry_points.txt
reading manifest file 'tox.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'CHANGELOG'
writing manifest file 'tox.egg-info/SOURCES.txt'
running build_ext
using tox.ini: /usr/src/RPM/BUILD/python-module-tox-2.9.1/tox.ini
using tox-2.9.1 from /usr/src/RPM/BUILD/python-module-tox-2.9.1/tox/__init__.pyc
GLOB sdist-make: /usr/src/RPM/BUILD/python-module-tox-2.9.1/setup.py
  /usr/src/RPM/BUILD/python-module-tox-2.9.1$ /usr/bin/python /usr/src/RPM/BUILD/python-module-tox-2.9.1/setup.py sdist --formats=zip --dist-dir /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/dist >/usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/log/tox-0.log
py create: /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py
  /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox$ /usr/bin/python -m virtualenv --python /usr/bin/python py >/usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/log/py-0.log
py installdeps: pytest >= 3.0.0, pytest-cov, pytest-timeout, pytest-xdist
  /usr/src/RPM/BUILD/python-module-tox-2.9.1$ /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/bin/pip install pytest >= 3.0.0 pytest-cov pytest-timeout pytest-xdist >/usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/log/py-1.log
py inst: /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/dist/tox-2.9.1.zip
  /usr/src/RPM/BUILD/python-module-tox-2.9.1$ /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/bin/pip install /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/dist/tox-2.9.1.zip >/usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/log/py-2.log
ERROR: invocation failed (exit code 1), logfile: /usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/log/py-2.log
ERROR: actionid: py
msg: installpkg
cmdargs: ['/usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/py/bin/pip', 'install', '/usr/src/RPM/BUILD/python-module-tox-2.9.1/.tox/dist/tox-2.9.1.zip']

Processing ./.tox/dist/tox-2.9.1.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/src/tmp/pip-GO568q-build/setup.py", line 100, in <module>
        main()
      File "/usr/src/tmp/pip-GO568q-build/setup.py", line 68, in main
        long_description=get_long_description(),
      File "/usr/src/tmp/pip-GO568q-build/setup.py", line 45, in get_long_description
        with io.open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf-8') as g:
    IOError: [Errno 2] No such file or directory: '/usr/src/tmp/pip-GO568q-build/CHANGELOG.rst'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /usr/src/tmp/pip-GO568q-build/

So, an error is lack of file 'CHANGELOG'.
There is include CHANGELOG directive in MANIFEST.in.
I've changed it to required include CHANGELOG.rst.
Test has been passed.

minor easy

All 8 comments

Hi @stanislavlevin thanks for the report. I also noticed that a few days ago and was wondering why it does not cause any problems - you found the way how it can cause problems now :). It does not cause problems for normal installations and running tests through tox (which is the way I run the tests and travis does it) though.

I fixed the broken reference right away on master. But I think we should also retire the testing through setup.py as we have started recommending not to run tests like that anymore last year, so we should not do that ourselves.

I removed python setup.py test in #664

Hello,
I am new to tox CI and I am running 3.14.0. But, I have just found the same Issue reported here. Surely I am missing something. Nonetheless I report here my findings:

I have set up a minimalist example so to start understanding the workflow. I made a dummy package with minimal, and I have following minimal tox configuration, though I have exactly the same problem with the CHANGELOG not found issue.

Processing ./.tox/.tmp/package/1/sampleproject-0.1.0.zip
    ERROR: Command errored out with exit status 1:
     command: /home/joao/GitHub/sampleproject/.tox/py37/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jbo4h1xj/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-jbo4h1xj/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-req-build-jbo4h1xj/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-jbo4h1xj/setup.py", line 30, in <module>
        re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))
      File "/tmp/pip-req-build-jbo4h1xj/setup.py", line 25, in read
        with open(join(here, *names), encoding=kwargs.get('encoding', 'utf8')) as fh:
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-jbo4h1xj/CHANGELOG.rst'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

you're missing CHANGELOG.rst in MANIFEST.in (or the file doesn't exist)

Thanks very much for your quick reply; I thought about that, though from the conversation on this issue I actually expected that reference to the MNIFEST.in were no longer needed.

Continuing on the issue, so I can understand the underlying logic:

I removed python setup.py test in #664

Why is still tox running python setup.py? or are there two separate executions of setup.py? How can I assure that I am following the corrected convention specified in your site?

this issue is about setup.py test -- tox still builds a source distribution of your project using python setup.py sdist

the issue about MANIFEST.in was about _tox itself_ in this particular case and not the consuming package

(and then pip runs python setup.py egg_info when installing)

Thanks for the clarification. And congratulations for the while TOX project. we stay tuned!

Was this page helpful?
0 / 5 - 0 ratings