ionelmc / cookiecutter-pylibrary

Enhanced cookiecutter template for Python libraries.
BSD 2-Clause "Simplified" License
1.25k stars 207 forks source link

Default setup with setuptools_scm not passing tests #195

Closed mateuspontesm closed 1 year ago

mateuspontesm commented 4 years ago

I tried to create the default setup (nameless) setting setuptools_scm='yes' and it fails when running tox in all environments:

ERROR:   check: commands failed
ERROR:   docs: commands failed
ERROR:   py27: InvocationError for command /home/mateuspontesm/Documents/Github/python-nameless/.tox/py27/bin/python -m pip install --exists-action w .tox/.tmp/package/1/nameless-0.0.0.zip (exited with code 1)
ERROR:   py35: InvocationError for command /home/mateuspontesm/Documents/Github/python-nameless/.tox/py35/bin/python -m pip install --exists-action w .tox/.tmp/package/1/nameless-0.0.0.zip (exited with code 1)
ERROR:   py36: InvocationError for command /home/mateuspontesm/Documents/Github/python-nameless/.tox/py36/bin/python -m pip install --exists-action w .tox/.tmp/package/1/nameless-0.0.0.zip (exited with code 1)
ERROR:   py37: InvocationError for command /home/mateuspontesm/Documents/Github/python-nameless/.tox/py37/bin/python -m pip install --exists-action w .tox/.tmp/package/1/nameless-0.0.0.zip (exited with code 1)
ERROR:   py38: InvocationError for command /home/mateuspontesm/Documents/Github/python-nameless/.tox/py38/bin/python -m pip install --exists-action w .tox/.tmp/package/1/nameless-0.0.0.zip (exited with code 1)
ERROR:   pypy: InvocationError for command pypy -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   pypy3: InvocationError for command pypy3 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   report: commands failed

The log gives:

Processing ./.tox/.tmp/package/1/nameless-0.0.0.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /home/mateuspontesm/Documents/Github/python-nameless/.tox/py38/bin/python /home/mateuspontesm/Documents/Github/python-nameless/.tox/py38/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpduigr880
       cwd: /tmp/pip-req-build-9aiemdhn
  Complete output (20 lines):
  Traceback (most recent call last):
    File "/home/mateuspontesm/Documents/Github/python-nameless/.tox/py38/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
      main()
    File "/home/mateuspontesm/Documents/Github/python-nameless/.tox/py38/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/mateuspontesm/Documents/Github/python-nameless/.tox/py38/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 91, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-hqv7g8p8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 147, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/pip-build-env-hqv7g8p8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 128, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-hqv7g8p8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 249, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/tmp/pip-build-env-hqv7g8p8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 143, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 37, in <module>
      re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))
    File "setup.py", line 19, in read
      with io.open(
  FileNotFoundError: [Errno 2] No such file or directory: 'CHANGELOG.rst'

Which is kind of strange since the CHANGELOG file is right there. image

ionelmc commented 4 years ago

Did you commit all your files? setuptools-scm relies heavily on information from git.

ionelmc commented 1 year ago

I guess it's not an issue anymore.